aboutsummaryrefslogtreecommitdiff
path: root/src/guff/api-methods.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/guff/api-methods.cr')
-rw-r--r--src/guff/api-methods.cr12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/guff/api-methods.cr b/src/guff/api-methods.cr
index 6cc3087..f0df8bc 100644
--- a/src/guff/api-methods.cr
+++ b/src/guff/api-methods.cr
@@ -321,32 +321,28 @@ module Guff
context : HTTP::Server::Context,
args : Hash(String, String)
)
- # TODO
- [{foo: "bar"}, {foo: "asdf"}].to_json
+ @models.post.get_posts(args).to_json
end
private def do_post_add_post(
context : HTTP::Server::Context,
args : Hash(String, String)
)
- # TODO: return post id
- {ok: true}.to_json
+ @models.post.add_post(args).to_json
end
private def do_post_remove_posts(
context : HTTP::Server::Context,
args : Hash(String, String)
)
- # TODO
- {ok: true}.to_json
+ @models.post.remove_posts(args).to_json
end
private def do_post_set_tags(
context : HTTP::Server::Context,
args : Hash(String, String)
)
- # TODO
- {ok: true}.to_json
+ @models.post.set_tags(args).to_json
end
###############