Merged in fix/add-missing-partner-data (pull request #3116)
fix: Add param to getScandicUser for extended data * Add param to getScandicUser for extended data Approved-by: Linus Flood
This commit is contained in:
@@ -23,7 +23,9 @@ type CreateContextOptions = {
|
||||
app: "scandic-web" | "partner-sas"
|
||||
getScandicUserToken: () => Promise<string | null>
|
||||
getUserPointsBalance: () => Promise<number | null>
|
||||
getScandicUser: () => Promise<ScandicUser | null>
|
||||
getScandicUser: (input?: {
|
||||
withExtendedPartnerData: boolean
|
||||
}) => Promise<ScandicUser | null>
|
||||
}
|
||||
|
||||
export function createContext(opts: CreateContextOptions) {
|
||||
|
||||
@@ -70,7 +70,7 @@ export const userQueryRouter = router({
|
||||
return null
|
||||
}
|
||||
|
||||
const user = await ctx.getScandicUser()
|
||||
const user = await ctx.getScandicUser({ withExtendedPartnerData: true })
|
||||
|
||||
if (!user) {
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user