feat: auth client middleware

This commit is contained in:
Nicolas Meienberger
2025-10-02 21:28:08 +02:00
parent 0120641e3a
commit 2be7e18ab5
15 changed files with 368 additions and 46 deletions

View File

@@ -93,5 +93,25 @@ export const getMeDto = describeRoute({
},
});
const statusResponseSchema = type({
hasUsers: "boolean",
});
export const getStatusDto = describeRoute({
description: "Get authentication system status",
operationId: "getStatus",
tags: ["Auth"],
responses: {
200: {
description: "Authentication system status",
content: {
"application/json": {
schema: resolver(statusResponseSchema),
},
},
},
},
});
export type LoginBody = typeof loginBodySchema.infer;
export type RegisterBody = typeof registerBodySchema.infer;