This commit is contained in:
Linus Flood
2024-11-22 13:25:57 +01:00
parent 299da82ba3
commit de22d873a1
9 changed files with 51 additions and 26 deletions

View File

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