misc: finalized response

This commit is contained in:
Sheen Capadngan
2025-03-19 02:26:51 +08:00
parent 015a193330
commit f059d65b45
3 changed files with 20 additions and 23 deletions
+17 -3
View File
@@ -486,9 +486,23 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
response: {
200: z.object({
message: z.string(),
user: UsersSchema,
organization: OrganizationsSchema,
identity: IdentitiesSchema.extend({
user: UsersSchema.pick({
username: true,
firstName: true,
lastName: true,
email: true,
id: true,
superAdmin: true
}),
organization: OrganizationsSchema.pick({
id: true,
name: true,
slug: true
}),
identity: IdentitiesSchema.pick({
id: true,
name: true
}).extend({
credentials: z.object({
token: z.string()
}) // would just be Token AUTH for now