Merged in feat/basic-user (pull request #3135)
feat(SW-3610): Get basic user from api * feat(SW-3610): Get basic user from api * . * Optional profileid Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -9,7 +9,7 @@ import { safeTry } from "@scandic-hotels/common/utils/safeTry"
|
||||
import * as api from "../../../api"
|
||||
import { protectedProcedure } from "../../../procedures"
|
||||
import { getUserSchema } from "../../user/output"
|
||||
import { getVerifiedUser } from "../../user/utils/getVerifiedUser"
|
||||
import { getBasicUser } from "../../user/utils/getBasicUser"
|
||||
|
||||
import type { FriendsTier } from "../../../types/user"
|
||||
|
||||
@@ -33,12 +33,12 @@ export const performLevelUpgrade = protectedProcedure
|
||||
}
|
||||
|
||||
const [profile, error] = await safeTry(
|
||||
getVerifiedUser({ token: ctx.session.token })
|
||||
getBasicUser({ token: ctx.session.token })
|
||||
)
|
||||
if (!profile?.membership || error) {
|
||||
if (!profile || error) {
|
||||
return { tierMatchState: "error" }
|
||||
}
|
||||
const currentLevel = profile.membership.membershipLevel
|
||||
const currentLevel = profile.tier
|
||||
|
||||
sasLogger.debug("tier match started")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user