feat: add user management API with endpoint to retrieve current user information

This commit is contained in:
GW_MC
2025-12-20 12:27:10 +08:00
parent b0b765b8fa
commit e59e7ca4c8
6 changed files with 147 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ export namespace Schemas {
version: string;
};
export type LoginRequest = { password: string; username: string };
export type UserInfo = { id: string; username: string };
// </Schemas>
}
@@ -41,6 +42,13 @@ export namespace Endpoints {
parameters: never;
responses: { 200: Schemas.HealthInfo; 404: unknown };
};
export type get_Get_user_info = {
method: "GET";
path: "/api/user/me";
requestFormat: "json";
parameters: never;
responses: { 200: Schemas.UserInfo; 401: unknown; 500: unknown };
};
// </Endpoints>
}
@@ -53,6 +61,7 @@ export type EndpointByMethod = {
};
get: {
"/api/health/info": Endpoints.get_Get_health_info;
"/api/user/me": Endpoints.get_Get_user_info;
};
};