diff --git a/components/user/preferences.vue b/components/user/preferences.vue new file mode 100644 index 0000000..a770b99 --- /dev/null +++ b/components/user/preferences.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/src/web/serialize.js b/src/web/serialize.js new file mode 100644 index 0000000..ca1a35b --- /dev/null +++ b/src/web/serialize.js @@ -0,0 +1,13 @@ +import { stringify } from '@brillout/json-serializer/stringify'; + +export default function serializeApiResponses(req, res, next) { + res.json = function json(obj) { // eslint-disable-line no-param-reassign + if (!this.get('Content-Type')) { + this.set('Content-Type', 'application/json'); + } + + return this.send(stringify(obj)); + }; + + next(); +}