diff --git a/src/models/post.ts b/src/models/post.ts index 8b49115..8849074 100644 --- a/src/models/post.ts +++ b/src/models/post.ts @@ -197,6 +197,11 @@ PostSchema.method('json', function json(options: PostToJSO post.community_id = community.community_id; } + // * Some sanity checks + if (post.feeling_id < 5) { + post.feeling_id = 0; + } + return post; });