diff options
Diffstat (limited to 'src/guff/api-content-type.cr')
-rw-r--r-- | src/guff/api-content-type.cr | 12 |
1 files changed, 12 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..9b6c74a --- /dev/null +++ b/src/guff/api-content-type.cr @@ -0,0 +1,12 @@ +module Guff + module APIContentType + CONTENT_TYPES = { + "development": "text/html; charset=utf-8", + "production": "application/json; charset=utf8", + } + + private def get_content_type + CONTENT_TYPES[@model.config["environment"]] + end + end +end |