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:
parent
89bb83b8ad
commit
f49cecf985
components
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user