if post feeling_id < 5, set to 0

This commit is contained in:
Jonathan Barrow 2023-10-02 23:31:40 -04:00
parent 153df65692
commit ef67cfd2b7
No known key found for this signature in database
GPG Key ID: E86E9FE9049C741F

View File

@ -197,6 +197,11 @@ PostSchema.method<HydratedPostDocument>('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;
});