From a4a1fc4b63e0bd0047b348cea0b2d7fb377f4ac3 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Wed, 31 May 2023 22:16:55 +1000 Subject: [PATCH] Add publish action --- slices/admin/actions/posts/publish.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 slices/admin/actions/posts/publish.rb diff --git a/slices/admin/actions/posts/publish.rb b/slices/admin/actions/posts/publish.rb new file mode 100644 index 0000000..17cc4ab --- /dev/null +++ b/slices/admin/actions/posts/publish.rb @@ -0,0 +1,16 @@ +module Admin + module Actions + module Posts + class Publish < Action + + include Deps["repos.post_repo"] + + def handle(req, res) + post_id = req.params[:id] + + post_repo.publish(id: post_id) + end + end + end + end +end \ No newline at end of file