mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-26 17:19:09 +00:00
Improve efficiency of calculateUserClientsForOrgs
This commit is contained in:
@@ -56,7 +56,6 @@ const bodySchema = z
|
||||
export type CreateOrgUserResponse = {};
|
||||
const CreateOrgUserResponseDataSchema = z.object({});
|
||||
|
||||
|
||||
registry.registerPath({
|
||||
method: "put",
|
||||
path: "/org/{orgId}/user",
|
||||
@@ -77,7 +76,9 @@ registry.registerPath({
|
||||
description: "Successful response",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: createApiResponseSchema(CreateOrgUserResponseDataSchema)
|
||||
schema: createApiResponseSchema(
|
||||
CreateOrgUserResponseDataSchema
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -326,13 +327,11 @@ export async function createOrgUser(
|
||||
});
|
||||
|
||||
if (userIdForClients) {
|
||||
calculateUserClientsForOrgs(userIdForClients, primaryDb).catch(
|
||||
(e) => {
|
||||
logger.error(
|
||||
`Failed to calculate user clients after creating org user: ${e}`
|
||||
);
|
||||
}
|
||||
);
|
||||
calculateUserClientsForOrgs(userIdForClients).catch((e) => {
|
||||
logger.error(
|
||||
`Failed to calculate user clients after creating org user: ${e}`
|
||||
);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return next(
|
||||
|
||||
Reference in New Issue
Block a user