Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
yimmyj committed Apr 4, 2024
1 parent 213ebfd commit 3e73caa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion repositories/EventRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@ export class EventRepository extends BaseRepository<EventModel> {
return query;
}
}

3 changes: 2 additions & 1 deletion services/EventService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ export default class EventService {
if (!currentEvent) throw new NotFoundError('Event not found');
if (changes.attendanceCode !== currentEvent.attendanceCode) {
const isAvailableAttendanceCode = await eventRepository.isAvailableAttendanceCode(
changes.attendanceCode, changes.start, changes.end);
changes.attendanceCode, changes.start, changes.end,
);
if (!isAvailableAttendanceCode) {
throw new UserError('There is a conflicting event with the same attendance code');
}
Expand Down
2 changes: 1 addition & 1 deletion tests/event.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,4 @@ describe('event deletion', () => {

expect(repositoryEvent).toEqual(event);
});
});
});

0 comments on commit 3e73caa

Please sign in to comment.