Merged in feature/SW-2320-languagebased-hide-for-next-release (pull request #1937)
Language based alternative to HIDE_FOR_NEXT_RELEASE Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -230,7 +230,7 @@ export const metadataQueryRouter = router({
|
||||
if (metadata) {
|
||||
if (alternates) {
|
||||
// Hiding alternates until all languages are released in production
|
||||
if (!env.HIDE_FOR_NEXT_RELEASE) {
|
||||
if (env.NEW_SITE_LIVE_STATUS === "ALL_LANGUAGES_LIVE") {
|
||||
metadata.alternates = alternates
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ export async function updateStaysBookingUrl(
|
||||
const baseUrl = env.PUBLIC_URL || "https://www.scandichotels.com"
|
||||
|
||||
// Construct Booking URL.
|
||||
const bookingUrl = env.HIDE_FOR_NEXT_RELEASE
|
||||
const bookingUrl = !env.isLangLive(lang)
|
||||
? new URL(
|
||||
getCurrentWebUrl({
|
||||
path: myBookingPath[lang],
|
||||
|
||||
@@ -11,9 +11,8 @@ export async function getServiceToken() {
|
||||
const tracer = trace.getTracer("getServiceToken")
|
||||
|
||||
return await tracer.startActiveSpan("getServiceToken", async () => {
|
||||
const scopes = env.ENABLE_BOOKING_FLOW
|
||||
? ["profile", "hotel", "booking", "package", "availability"]
|
||||
: ["profile"]
|
||||
const scopes = ["profile", "hotel", "booking", "package", "availability"]
|
||||
|
||||
const cacheKey = getServiceTokenCacheKey(scopes)
|
||||
const cacheClient = await getCacheClient()
|
||||
const token = await getOrSetServiceTokenFromCache(cacheKey, scopes, tracer)
|
||||
|
||||
Reference in New Issue
Block a user