Skip to content

Commit 9ead8f5

Browse files
committed
chore: fix lint errors
1 parent a4a25f7 commit 9ead8f5

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

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

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -286,53 +286,53 @@ API.v1.addRoute(
286286
);
287287

288288
const saveNotificationBodySchema = ajv.compile<{
289-
roomId: string;
290-
notifications: Record<string, string>;
289+
roomId: string;
290+
notifications: Record<string, string>;
291291
}>({
292-
type: 'object',
293-
properties: {
294-
roomId: { type: 'string' },
295-
notifications: {
296-
type: 'object',
297-
minProperties: 1,
298-
additionalProperties: { type: 'string' },
299-
},
300-
},
301-
required: ['roomId', 'notifications'],
302-
additionalProperties: false,
292+
type: 'object',
293+
properties: {
294+
roomId: { type: 'string' },
295+
notifications: {
296+
type: 'object',
297+
minProperties: 1,
298+
additionalProperties: { type: 'string' },
299+
},
300+
},
301+
required: ['roomId', 'notifications'],
302+
additionalProperties: false,
303303
});
304304

305305
const saveNotificationResponseSchema = ajv.compile({
306-
type: 'object',
307-
properties: {
308-
success: { type: 'boolean', enum: [true] },
309-
},
310-
required: ['success'],
311-
additionalProperties: false,
306+
type: 'object',
307+
properties: {
308+
success: { type: 'boolean', enum: [true] },
309+
},
310+
required: ['success'],
311+
additionalProperties: false,
312312
});
313313

314314
export const roomsSaveNotificationEndpoint = API.v1.post(
315-
'rooms.saveNotification',
316-
{
317-
authRequired: true,
318-
body: saveNotificationBodySchema,
319-
response: {
320-
200: saveNotificationResponseSchema,
321-
400: validateBadRequestErrorResponse,
322-
401: validateUnauthorizedErrorResponse,
323-
},
324-
},
325-
async function action() {
326-
const { roomId, notifications } = this.bodyParams;
327-
328-
await Promise.all(
329-
Object.entries(notifications as Notifications).map(async ([notificationKey, notificationValue]) =>
330-
saveNotificationSettingsMethod(this.userId, roomId, notificationKey as NotificationFieldType, notificationValue),
331-
),
332-
);
333-
334-
return API.v1.success();
335-
},
315+
'rooms.saveNotification',
316+
{
317+
authRequired: true,
318+
body: saveNotificationBodySchema,
319+
response: {
320+
200: saveNotificationResponseSchema,
321+
400: validateBadRequestErrorResponse,
322+
401: validateUnauthorizedErrorResponse,
323+
},
324+
},
325+
async function action() {
326+
const { roomId, notifications } = this.bodyParams;
327+
328+
await Promise.all(
329+
Object.entries(notifications as Notifications).map(async ([notificationKey, notificationValue]) =>
330+
saveNotificationSettingsMethod(this.userId, roomId, notificationKey as NotificationFieldType, notificationValue),
331+
),
332+
);
333+
334+
return API.v1.success();
335+
},
336336
);
337337

338338
API.v1.addRoute(

0 commit comments

Comments
 (0)