We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19270b4 commit 91260e6Copy full SHA for 91260e6
src/resolvers/authorization.js
@@ -17,9 +17,9 @@ export const isMessageOwner = async (
17
{ id },
18
{ models, me },
19
) => {
20
- const message = await models.Message.findById(id, { raw: true });
+ const message = await models.Message.findById(id);
21
22
- if (message.userId !== me.id) {
+ if (message.userId != me.id) {
23
throw new ForbiddenError('Not authenticated as owner.');
24
}
25
0 commit comments