fix: add feature flag for service token scopes

This commit is contained in:
Michael Zetterberg
2024-10-23 12:18:08 +02:00
parent 445bde8e2e
commit d5abe13a7e

View File

@@ -70,7 +70,12 @@ async function fetchServiceToken(scopes: string[]) {
}
export async function getServiceToken() {
const scopes = ["profile", "hotel", "booking"]
let scopes: string[] = []
if (env.HIDE_FOR_NEXT_RELEASE) {
scopes = ["profile"]
} else {
scopes = ["profile", "hotel", "booking"]
}
const tag = generateServiceTokenTag(scopes)
const getCachedJwt = unstable_cache(
async (scopes) => {