aboutsummaryrefslogtreecommitdiff
path: root/src/guff/api/content-type.cr
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-03-08 05:06:34 -0500
committerPaul Duncan <pabs@pablotron.org>2016-03-08 05:06:34 -0500
commit2c60a34cbe95d34950977e59d9316a1885b4fd6f (patch)
treecd510b6bf03e9eb9ebdccd5ec4a4f92acfdc3669 /src/guff/api/content-type.cr
parent490464d7d07e94b6ee69bbbc4b290a2b0e3a0975 (diff)
downloadold-guff-2c60a34cbe95d34950977e59d9316a1885b4fd6f.tar.bz2
old-guff-2c60a34cbe95d34950977e59d9316a1885b4fd6f.zip
reorganize api
Diffstat (limited to 'src/guff/api/content-type.cr')
-rw-r--r--src/guff/api/content-type.cr10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/guff/api/content-type.cr b/src/guff/api/content-type.cr
new file mode 100644
index 0000000..589e6b0
--- /dev/null
+++ b/src/guff/api/content-type.cr
@@ -0,0 +1,10 @@
+module Guff::API::ContentType
+ CONTENT_TYPES = {
+ "development": "text/html; charset=utf-8",
+ "production": "application/json; charset=utf8",
+ }
+
+ private def get_content_type
+ CONTENT_TYPES[@models.config["environment"]]
+ end
+end