feat(SW-739): use new allTiers endpoint and add feature flag

This commit is contained in:
Chuma McPhoy
2024-11-08 14:50:18 +01:00
parent 35a527be05
commit 48af26a772
7 changed files with 107 additions and 8 deletions

8
env/server.ts vendored
View File

@@ -72,6 +72,13 @@ export const env = createEnv({
.refine((s) => s === "true" || s === "false")
// transform to boolean
.transform((s) => s === "true"),
USE_NEW_REWARDS_ENDPOINT: z
.string()
// only allow "true" or "false"
.refine((s) => s === "true" || s === "false")
// transform to boolean
.transform((s) => s === "true")
.default("false"),
},
emptyStringAsUndefined: true,
runtimeEnv: {
@@ -126,5 +133,6 @@ export const env = createEnv({
GOOGLE_STATIC_MAP_ID: process.env.GOOGLE_STATIC_MAP_ID,
GOOGLE_DYNAMIC_MAP_ID: process.env.GOOGLE_DYNAMIC_MAP_ID,
HIDE_FOR_NEXT_RELEASE: process.env.HIDE_FOR_NEXT_RELEASE,
USE_NEW_REWARDS_ENDPOINT: process.env.USE_NEW_REWARDS_ENDPOINT,
},
})