feat: add user management API with endpoint to retrieve current user information
This commit is contained in:
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user