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:
@@ -37,3 +37,20 @@ export const removeRolesFromMember = async (memberId: string, roleIds: string[])
|
||||
console.error("Error removing roles from member:", error);
|
||||
});
|
||||
};
|
||||
|
||||
export const setStandardName = async ({
|
||||
memberId,
|
||||
userId,
|
||||
}: {
|
||||
memberId: string;
|
||||
userId: string;
|
||||
}) => {
|
||||
discordAxiosClient
|
||||
.post("/helper/set-standard-name", {
|
||||
memberId,
|
||||
userId,
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error removing roles from member:", error);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user