Add admin area

This commit is contained in:
2023-05-06 17:11:54 +10:00
parent 08943a3f93
commit c4bd903e74
21 changed files with 258 additions and 5 deletions

View File

View 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

View 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

View 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