Skip to content

Commit

Permalink
make rooms lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémai Gábor committed Nov 7, 2023
1 parent c697ffa commit 917e4a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/services/rooms/rooms.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ export const roomDataSchema = Type.Intersect([
export type RoomData = Static<typeof roomDataSchema>
export const roomDataValidator = getValidator(roomDataSchema, dataValidator);
export const roomDataResolver = resolve<Room, HookContext>({
// on room-server rooms are case insensitive
name: async (value, room, context) => context.data.name.toLowerCase(),
createdAt: async () => Date.now(),
updatedAt: async () => Date.now(),
creatorId: async (value, room, context) => context.params.user?.id,
Expand Down

0 comments on commit 917e4a4

Please # to comment.