Refactor
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user