File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,29 +5,29 @@ import { Team } from "@calcom/prisma/client";
55import { ApiAuthGuardUser } from "../modules/auth/strategies/api-auth/api-auth.strategy" ;
66
77export interface UserContext {
8- userId ?: number ;
8+ userId ?: string ;
99 userEmail ?: string ;
10- organizationId ?: number ;
11- teamId ?: number ;
10+ organizationId ?: string ;
11+ teamId ?: string ;
1212}
1313
1414export function extractUserContext ( request : Request ) : UserContext {
1515 const context : UserContext = { } ;
1616
1717 const user = ( request as any ) . user as ApiAuthGuardUser | undefined ;
1818 if ( user ) {
19- context . userId = user . id ;
19+ context . userId = String ( user . id ) ;
2020 context . userEmail = user . email ;
2121 }
2222
2323 const organizationId = ( request as any ) . organizationId as number | undefined ;
2424 if ( organizationId ) {
25- context . organizationId = organizationId ;
25+ context . organizationId = String ( organizationId ) ;
2626 }
2727
2828 const team = ( request as any ) . team as Team | undefined ;
2929 if ( team ) {
30- context . teamId = team . id ;
30+ context . teamId = String ( team . id ) ;
3131 }
3232
3333 return context ;
You can’t perform that action at this time.
0 commit comments