Manage books page via admin area
This commit is contained in:
12
slices/admin/actions/books/index.rb
Normal file
12
slices/admin/actions/books/index.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
module Actions
|
||||
module Books
|
||||
class Index < Admin::Action
|
||||
def handle(request, response)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
17
slices/admin/actions/books/update.rb
Normal file
17
slices/admin/actions/books/update.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
module Actions
|
||||
module Books
|
||||
class Update < Admin::Action
|
||||
|
||||
include Deps["repos.book_repo"]
|
||||
|
||||
def handle(req, resp)
|
||||
book_repo.update(req.params[:id], book_status: req.params[:book_status])
|
||||
resp.status = 204
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user