aboutsummaryrefslogtreecommitdiff
path: root/src/guff/api-methods.cr
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-03-06 18:08:34 -0500
committerPaul Duncan <pabs@pablotron.org>2016-03-06 18:08:34 -0500
commitb89d53220afee70a991fe8c3ec694e32f1954ea0 (patch)
treece65990beca3d70ca81b438048aaf0f5997f29e3 /src/guff/api-methods.cr
parent5771ff1b239f8452a718cebcc2cf8ae49a93b3a9 (diff)
downloadold-guff-b89d53220afee70a991fe8c3ec694e32f1954ea0.tar.bz2
old-guff-b89d53220afee70a991fe8c3ec694e32f1954ea0.zip
populate postmodel stubs
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
###############