Merged in fix/SW-3536-wl-cannot-initialize-payment- (pull request #2953)
fix SW-3536 Fixed create booking call for sas logged in users in the partner site Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { LoginTypeEnum } from "@scandic-hotels/common/constants/loginType"
|
||||
import { createCounter } from "@scandic-hotels/common/telemetry"
|
||||
|
||||
import * as api from "../../api"
|
||||
@@ -7,6 +8,7 @@ import { createBookingSchema } from "./mutation/create/schema"
|
||||
import { bookingConfirmationSchema } from "./output"
|
||||
|
||||
import type { Lang } from "@scandic-hotels/common/constants/language"
|
||||
import type { Session } from "next-auth"
|
||||
|
||||
export async function getBooking(
|
||||
confirmationNumber: string,
|
||||
@@ -157,3 +159,9 @@ export async function cancelBooking(
|
||||
|
||||
return verifiedData.data
|
||||
}
|
||||
|
||||
// ToDo - Update the function to return true for Scandic site and
|
||||
// in case of Partner sites fetch the Scandic Curity token for linked user and service token for unlinked user
|
||||
export function isPartnerLoggedInUser(session: Session) {
|
||||
return session.token.loginType === LoginTypeEnum.sas
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user