Skip to content

Commit

Permalink
Fix contract lookup for H2 (thepeacockproject#179)
Browse files Browse the repository at this point in the history
* Fix contract lookup for H2

* dedupe jsons
  • Loading branch information
moonysolari authored Apr 7, 2023
1 parent 0e2135e commit 3ded349
Show file tree
Hide file tree
Showing 3 changed files with 1,946 additions and 2 deletions.
3 changes: 3 additions & 0 deletions components/configSwizzleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ import H2ContractSearchResponseTemplate from "../static/H2ContractSearchResponse
import H2LocationsData from "../static/H2LocationsData.json"
import H2FilterData from "../static/H2FilterData.json"
import H2DashboardTemplate from "../static/H2DashboardTemplate.json"
import H2LookupContractTemplate from "../static/H2LookupContractTemplate.json"
import FrankensteinHubTemplate from "../static/FrankensteinHubTemplate.json"
import FrankensteinMmSpTemplate from "../static/FrankensteinMmSpTemplate.json"
import FrankensteinMmMpTemplate from "../static/FrankensteinMmMpTemplate.json"
Expand Down Expand Up @@ -184,6 +185,8 @@ const configs: Record<string, unknown> = {
H2StoreData,
H2ContractSearchResponseTemplate,
H2LocationsData,
H2LookupContractByIdTemplate: H2LookupContractTemplate,
H2LookupContractFavoriteTemplate: H2LookupContractTemplate,
H2FilterData,
H2DashboardTemplate,
FrankensteinMmSpTemplate,
Expand Down
5 changes: 3 additions & 2 deletions components/menus/favoriteContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ import type {
import { controller } from "../controller"
import { generateUserCentric } from "../contracts/dataGen"
import { getUserData, writeUserData } from "../databaseHandler"
import { getConfig, getVersionedConfig } from "../configSwizzleManager"
import { getVersionedConfig } from "../configSwizzleManager"
import type { Response } from "express"

export function withLookupDialog(
req: RequestWithJwt<{ contractId: string }>,
res: Response,
): void {
const lookupFavoriteTemplate = getConfig(
const lookupFavoriteTemplate = getVersionedConfig(
"LookupContractFavoriteTemplate",
req.gameVersion,
false,
)

Expand Down
Loading

0 comments on commit 3ded349

Please sign in to comment.