diff --git a/server/api/review/[revid]/index.put.ts b/server/api/review/[revid]/index.put.ts index 4958bba..f47ac4b 100644 --- a/server/api/review/[revid]/index.put.ts +++ b/server/api/review/[revid]/index.put.ts @@ -1,5 +1,6 @@ import san from "sanitize-html"; import { messages } from "~/lib/server/constants"; +import { log } from "~/lib/server/logger"; import isLoggedIn from "~/lib/server/middlewareButNotReally/isLoggedIn"; import { Review } from "~/models/stories/review"; @@ -13,7 +14,10 @@ export default eventHandler(async (ev) => { message: messages[404], }); } - if (c?.author != ev.context.currentUser?._id) { + log.silly(`${ev.context.currentUser!._id!} || ${c.author}`, { + label: "what the fuck", + }); + if (c?.author._id != ev.context.currentUser?._id) { throw createError({ message: messages[403], statusCode: 403,