From b89d53220afee70a991fe8c3ec694e32f1954ea0 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 6 Mar 2016 18:08:34 -0500 Subject: populate postmodel stubs --- src/guff/api-methods.cr | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/guff/api-methods.cr') 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 ############### -- cgit v1.2.3