fix: allow any membership level
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { MembershipLevelEnum } from "@/constants/membershipLevels"
|
||||
|
||||
import { countriesMap } from "@/components/TempDesignSystem/Form/Country/countries"
|
||||
|
||||
export const getUserSchema = z.object({
|
||||
@@ -22,7 +20,7 @@ export const getUserSchema = z.object({
|
||||
currentPoints: z.number(),
|
||||
expirationDate: z.string(),
|
||||
membershipNumber: z.string(),
|
||||
membershipLevel: z.nativeEnum(MembershipLevelEnum).optional(),
|
||||
membershipLevel: z.string().optional(),
|
||||
memberSince: z.string(),
|
||||
membershipType: z.string(),
|
||||
nextLevel: z.string().optional(),
|
||||
|
||||
@@ -33,6 +33,7 @@ import type {
|
||||
LoginType,
|
||||
TrackingSDKUserData,
|
||||
} from "@/types/components/tracking"
|
||||
import type { MembershipLevel } from "@/constants/membershipLevels"
|
||||
|
||||
// OpenTelemetry metrics: User
|
||||
const meter = metrics.getMeter("trpc.user")
|
||||
@@ -437,7 +438,7 @@ export const userQueryRouter = router({
|
||||
loginStatus: "logged in",
|
||||
loginType: ctx.session.token.loginType as LoginType,
|
||||
memberId: membership?.membershipNumber,
|
||||
memberLevel: membership?.membershipLevel,
|
||||
memberLevel: membership?.membershipLevel as MembershipLevel,
|
||||
noOfNightsStayed: verifiedPreviousStaysData.data.links?.totalCount ?? 0,
|
||||
totalPointsAvailableToSpend: membership?.currentPoints,
|
||||
loginAction: "login success",
|
||||
|
||||
Reference in New Issue
Block a user