added chron to hub server, removed starterEvent
This commit is contained in:
11
apps/hub-server/helper/event.ts
Normal file
11
apps/hub-server/helper/event.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Event, Participant } from "@repo/db";
|
||||
|
||||
export const participantCompleted = (
|
||||
event: Event,
|
||||
participant: Participant,
|
||||
) => {
|
||||
if (event.finisherMoodleCourseId && !participant.finisherMoodleCurseCompleted)
|
||||
return false;
|
||||
if (event.hasPresenceEvents && !participant.attended) return false;
|
||||
return true;
|
||||
};
|
||||
Reference in New Issue
Block a user