1
mirror of https://github.com/thepeacockproject/Peacock synced 2025-03-01 14:43:02 +01:00

Drop hook "getMissionEnd"

Signed-off-by: Reece Dunham <me@rdil.rocks>
This commit is contained in:
Reece Dunham 2023-04-28 21:07:49 -04:00
parent 89bb83b8ad
commit f49cecf985
No known key found for this signature in database
GPG Key ID: F087CB485320F19F
2 changed files with 5 additions and 25 deletions

@ -77,7 +77,6 @@ import { promisify } from "util"
import { brotliDecompress } from "zlib"
import assert from "assert"
import { Response } from "express"
import { MissionEndRequestQuery } from "./types/gameSchemas"
import { ChallengeFilterType } from "./candle/challengeHelpers"
import { MasteryService } from "./candle/masteryService"
import { MasteryPackage } from "./types/mastery"
@ -374,13 +373,7 @@ export class Controller {
],
PlayNextGetCampaignsHookReturn | undefined
>
getMissionEnd: SyncBailHook<
[
/** req */ RequestWithJwt<MissionEndRequestQuery>,
/** res */ Response,
],
boolean
>
onMissionEnd: SyncHook<[/** session */ ContractSession]>
}
public configManager: typeof configManagerType = {
getConfig,
@ -427,7 +420,7 @@ export class Controller {
contributeCampaigns: new SyncHook(),
getSearchResults: new AsyncSeriesHook(),
getNextCampaignMission: new SyncBailHook(),
getMissionEnd: new SyncBailHook(),
onMissionEnd: new SyncHook(),
}
if (modFrameworkDataPath && existsSync(modFrameworkDataPath)) {

@ -745,7 +745,7 @@ menuDataRouter.get(
})
}
await innerMissionEnd(req, res)
await missionEnd(req, res)
},
)
@ -963,22 +963,9 @@ menuDataRouter.get("/missionendready", async (req, res) => {
}
})
menuDataRouter.get("/missionend", innerMissionEnd)
menuDataRouter.get("/missionend", missionEnd)
menuDataRouter.get("/scoreoverviewandunlocks", innerMissionEnd)
async function innerMissionEnd(
req: RequestWithJwt<MissionEndRequestQuery>,
res: Response,
): Promise<void> {
const result = controller.hooks.getMissionEnd.call(req, res)
if (result) {
return
}
await missionEnd(req, res)
}
menuDataRouter.get("/scoreoverviewandunlocks", missionEnd)
menuDataRouter.get(
"/Destination",