chore: fixed variable name

This commit is contained in:
nostrdev-com 2025-04-02 12:46:36 +03:00
parent 35b2cec312
commit 14b61fa0f3

@ -37,11 +37,11 @@ reviewsRouter.post('/', async (req: Request, res: Response) => {
throw error.details[0].message
}
const reviews = await collections.reviews?.findOne({
const existingReview = await collections.reviews?.findOne({
eventId: review.eventId
})
if (reviews) {
if (existingReview) {
throw new Error('review with provided "eventId" exists')
}