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:
Anton Gunnarsson
2025-11-10 15:23:07 +00:00
parent ce3412b29f
commit 0b569e28ce
4 changed files with 8 additions and 4 deletions

View File

@@ -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) {

View File

@@ -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