Skip to content

fix: add missing answer notification enum type#11

Open
Anjali-collab21 wants to merge 1 commit into
Ashmita1206:mainfrom
Anjali-collab21:fix/answer-notification-enum
Open

fix: add missing answer notification enum type#11
Anjali-collab21 wants to merge 1 commit into
Ashmita1206:mainfrom
Anjali-collab21:fix/answer-notification-enum

Conversation

@Anjali-collab21

@Anjali-collab21 Anjali-collab21 commented May 16, 2026

Copy link
Copy Markdown

Description

Fixes #3
Fixes notification validation failure when creating answer notifications.

Problem

The backend creates notifications using:

type: 'answer'

inside server/routes/answers.js, but the Notification schema enum in server/models/Notification.js did not include "answer" as an allowed value.

This caused Mongoose validation to fail during notification creation while the answer itself was still created successfully.

Fix

Added "answer" to the allowed enum values in the Notification schema.

Verification

  • Reproduced the issue locally
  • Verified validation failure before the fix
  • Confirmed successful notification creation after update
  • Verified notifications are now stored correctly in MongoDB

@vercel

vercel Bot commented May 16, 2026

Copy link
Copy Markdown

@Anjali-collab21 is attempting to deploy a commit to the ashmitagoyal1206-7687's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Karanjot786

Copy link
Copy Markdown

Hey @Anjali-collab21! Saw your work on GSSoC 2026.

We are building TermUI, a TypeScript terminal UI framework with React-style hooks and JSX, rendered entirely in the terminal.

We have 67 unassigned GSSoC issues open. 19 are marked good first issue. Your JavaScript background transfers directly.

Karanjot, TermUI maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix answer notification creation failure due to notification schema mismatch

2 participants