Add editable pages
This commit is contained in:
14
slices/admin/actions/pages/update.rb
Normal file
14
slices/admin/actions/pages/update.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
module Admin
|
||||
module Actions
|
||||
module Pages
|
||||
class Update < Action
|
||||
include Deps["commands.pages.update"]
|
||||
|
||||
def handle(req, res)
|
||||
update.call(page: req.params[:page])
|
||||
res.redirect "/admin/pages/#{req.params[:page][:slug]}/edit"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user