Update trips
This commit is contained in:
21
slices/admin/actions/trips/update.rb
Normal file
21
slices/admin/actions/trips/update.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
module Actions
|
||||
module Trips
|
||||
class Update < Admin::Action
|
||||
|
||||
include Deps["commands.trips.update"]
|
||||
|
||||
def handle(req, res)
|
||||
id = req.params[:id]
|
||||
trip = req.params[:trip]
|
||||
|
||||
update.call(id: id, trip: trip)
|
||||
|
||||
res.redirect_to "/admin/trips/#{id}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user