Skip to content

Commit 0ca2bc2

Browse files
committed
fix: enforce string values in notifications schema for rooms.saveNotification endpoint
1 parent 4b1f286 commit 0ca2bc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/meteor/app/api/server/v1/rooms.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,15 +287,15 @@ API.v1.addRoute(
287287

288288
const saveNotificationBodySchema = ajv.compile<{
289289
roomId: string;
290-
notifications: Record<string, unknown>;
290+
notifications: Record<string, string>;
291291
}>({
292292
type: 'object',
293293
properties: {
294294
roomId: { type: 'string' },
295295
notifications: {
296296
type: 'object',
297297
minProperties: 1,
298-
additionalProperties: true,
298+
additionalProperties: { type: 'string' },
299299
},
300300
},
301301
required: ['roomId', 'notifications'],

0 commit comments

Comments
 (0)