fix(auth): handle missing workspaceId in auth service (#11173)
Add a check to return undefined if workspaceId is not provided. Prevents unnecessary execution and potential errors during workspace lookup.
This commit is contained in:
@ -562,12 +562,14 @@ export class AuthService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return await this.workspaceRepository.findOne({
|
return params.workspaceId
|
||||||
where: {
|
? await this.workspaceRepository.findOne({
|
||||||
id: params.workspaceId,
|
where: {
|
||||||
},
|
id: params.workspaceId,
|
||||||
relations: ['approvedAccessDomains'],
|
},
|
||||||
});
|
relations: ['approvedAccessDomains'],
|
||||||
|
})
|
||||||
|
: undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
formatUserDataPayload(
|
formatUserDataPayload(
|
||||||
|
|||||||
Reference in New Issue
Block a user