fix: make api always return an authMethods array

This commit is contained in:
Daniel Hougaard
2024-10-26 23:26:22 +04:00
parent 418ae42d94
commit 70d2a21fbc
2 changed files with 4 additions and 2 deletions
@@ -37,7 +37,9 @@ export const registerIdentityRouter = async (server: FastifyZodProvider) => {
}), }),
response: { response: {
200: z.object({ 200: z.object({
identity: IdentitiesSchema identity: IdentitiesSchema.extend({
authMethods: z.array(z.string())
})
}) })
} }
}, },
@@ -93,7 +93,7 @@ export const identityServiceFactory = ({
tx tx
); );
} }
return newIdentity; return { ...newIdentity, authMethods: [] };
}); });
await licenseService.updateSubscriptionOrgMemberCount(orgId); await licenseService.updateSubscriptionOrgMemberCount(orgId);