fix: make api always return an authMethods array

This commit is contained in:
Daniel Hougaard
2024-10-18 02:39:45 +04:00
parent 418ae42d94
commit 70d2a21fbc
2 changed files with 4 additions and 2 deletions

View File

@@ -37,7 +37,9 @@ export const registerIdentityRouter = async (server: FastifyZodProvider) => {
}),
response: {
200: z.object({
identity: IdentitiesSchema
identity: IdentitiesSchema.extend({
authMethods: z.array(z.string())
})
})
}
},

View File

@@ -93,7 +93,7 @@ export const identityServiceFactory = ({
tx
);
}
return newIdentity;
return { ...newIdentity, authMethods: [] };
});
await licenseService.updateSubscriptionOrgMemberCount(orgId);