feat: Creating the first user

This commit is contained in:
Aleksi Lassila
2024-06-02 02:59:38 +03:00
parent 052ea44548
commit db21aef3f3
12 changed files with 141 additions and 44 deletions

View File

@@ -21,6 +21,11 @@ export class ReiverrApi implements Api<paths> {
});
}
isSetupDone = async (): Promise<boolean> =>
this.getClient()
?.GET('/user/isSetupDone')
.then((res) => res.data || false) || false;
async getUser() {
const res = await this.getClient()?.GET('/user', {});
return res.data;

View File

@@ -13,6 +13,9 @@ export interface paths {
get: operations["UserController_findById"];
put: operations["UserController_updateUser"];
};
"/user/isSetupDone": {
get: operations["UserController_isSetupDone"];
};
"/auth": {
post: operations["AuthController_signIn"];
};
@@ -175,6 +178,16 @@ export interface operations {
};
};
};
UserController_isSetupDone: {
responses: {
/** @description Setup done */
200: {
content: {
"application/json": boolean;
};
};
};
};
AuthController_signIn: {
requestBody: {
content: {