diff options
Diffstat (limited to 'src/guff/api/test.cr')
-rw-r--r-- | src/guff/api/test.cr | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/guff/api/test.cr b/src/guff/api/test.cr new file mode 100644 index 0000000..7549c11 --- /dev/null +++ b/src/guff/api/test.cr @@ -0,0 +1,28 @@ +require "json" + +module Guff + module API + module TestAPI + private def do_test_version( + context : HTTP::Server::Context, + args : Hash(String, String) + ) + {version: Guff::VERSION}.to_json + end + + private def do_test_get_posts( + context : HTTP::Server::Context, + args : Hash(String, String) + ) + [{foo: "bar"}, {foo: "asdf"}].to_json + end + + private def do_test_error( + context : HTTP::Server::Context, + args : Hash(String, String) + ) + raise "some random error" + end + end + end +end |