Add admin area
This commit is contained in:
0
slices/admin/actions/.keep
Normal file
0
slices/admin/actions/.keep
Normal file
12
slices/admin/actions/index.rb
Normal file
12
slices/admin/actions/index.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
module Admin
|
||||
module Actions
|
||||
class Index < Action
|
||||
|
||||
include Deps["views.index"]
|
||||
|
||||
def handle(req, res)
|
||||
res.render index
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
17
slices/admin/actions/tags/delete.rb
Normal file
17
slices/admin/actions/tags/delete.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
module Admin
|
||||
module Actions
|
||||
module Tags
|
||||
class Delete < Action
|
||||
|
||||
include Deps["repos.post_tag_repo", "repos.tag_repo"]
|
||||
|
||||
def handle(req, res)
|
||||
tag_id = req.params[:id]
|
||||
|
||||
post_tag_repo.delete(tag_id: tag_id)
|
||||
tag_repo.delete(tag_id: tag_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
14
slices/admin/actions/tags/index.rb
Normal file
14
slices/admin/actions/tags/index.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
module Admin
|
||||
module Actions
|
||||
module Tags
|
||||
class Index < Action
|
||||
|
||||
include Deps["views.tags.index"]
|
||||
|
||||
def handle(req, res)
|
||||
res.render index
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user