diff --git a/src/modules/ghost_ocm.ts b/src/modules/ghost_ocm.ts index 4389c9e..0e52047 100644 --- a/src/modules/ghost_ocm.ts +++ b/src/modules/ghost_ocm.ts @@ -139,7 +139,7 @@ export default class GhostModule extends Module { // If not yet tallying if(OCMTallyCount === 0) { - await ghost_ocm.ocmTallying(body, OCMCurrentPeriod.periodId, false, ocmEventDate!.competitionId); + await ghost_ocm.ocmTallying(body, OCMCurrentPeriod.periodId, false); // Completed console.log('Tally Completed!'); @@ -206,7 +206,7 @@ export default class GhostModule extends Module { { console.log('Tallying'); - await ghost_ocm.ocmTallying(body, OCMCurrentPeriod.periodId, true, ocmEventDate.competitionId); + await ghost_ocm.ocmTallying(body, OCMCurrentPeriod.periodId, true); // Completed console.log('Last Tally Completed!'); diff --git a/src/util/ghost/ghost_ocm.ts b/src/util/ghost/ghost_ocm.ts index e3fb769..3223496 100644 --- a/src/util/ghost/ghost_ocm.ts +++ b/src/util/ghost/ghost_ocm.ts @@ -6,7 +6,7 @@ import wmproto from "../../wmmt/wm.proto"; // OCM Tallying -export async function ocmTallying(body: wm.protobuf.LoadGhostCompetitionInfoRequest, periodId: number, ended: boolean, competitionId: number) +export async function ocmTallying(body: wm.protobuf.LoadGhostCompetitionInfoRequest, periodId: number, ended: boolean) { // OCM is still on going if(ended === false) @@ -283,7 +283,7 @@ export async function ocmTallying(body: wm.protobuf.LoadGhostCompetitionInfoRequ // Get user that playing OCM qualifying day let OCMTally = await prisma.oCMTally.findMany({ where:{ - competitionId: competitionId, + competitionId: body.competitionId, periodId: periodId }, orderBy:{