diff options
Diffstat (limited to 'src/guff/api/content-type.cr')
-rw-r--r-- | src/guff/api/content-type.cr | 10 |
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 |