removed event-chronjobs, used Events in hub-app insteand, added admin Btn to set Discord-User and run Event-completed-workflow. Fixed Bug of wrong participants-count in Event-Modal

This commit is contained in:
PxlLoewe
2025-06-05 23:02:34 -07:00
parent 91d811e289
commit 587884dfd9
21 changed files with 341 additions and 232 deletions

View File

@@ -1,4 +1,5 @@
import { Event, Participant } from "@repo/db";
import axios from "axios";
export const eventCompleted = (event: Event, participant?: Participant) => {
if (!participant) return false;
@@ -6,3 +7,13 @@ export const eventCompleted = (event: Event, participant?: Participant) => {
if (event.hasPresenceEvents && !participant.attended) return false;
return true;
};
export const handleParticipantFinished = async (participantId: string) =>
axios.post(`${process.env.NEXT_PUBLIC_HUB_SERVER_URL}/event/handle-participant-finished`, {
participantId,
});
export const handleParticipantEnrolled = async (participantId: string) =>
axios.post(`${process.env.NEXT_PUBLIC_HUB_SERVER_URL}/event/handle-participant-enrolled`, {
participantId,
});