feat: added login page

This commit is contained in:
nihonium 2025-11-23 03:57:35 +03:00
parent 69e8a8dc79
commit c500116916
Signed by untrusted user: nihonium
GPG key ID: 0251623741027CFC
12 changed files with 730 additions and 1 deletions

View file

@ -0,0 +1,58 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class AuthService {
/**
* Sign up a new user
* @param requestBody
* @returns any Sign-up result
* @throws ApiError
*/
public static postAuthSignUp(
requestBody: {
nickname: string;
pass: string;
},
): CancelablePromise<{
success?: boolean;
error?: string | null;
user_id?: string | null;
}> {
return __request(OpenAPI, {
method: 'POST',
url: '/auth/sign-up',
body: requestBody,
mediaType: 'application/json',
});
}
/**
* Sign in a user and return JWT
* @param requestBody
* @returns any Sign-in result with JWT
* @throws ApiError
*/
public static postAuthSignIn(
requestBody: {
nickname: string;
pass: string;
},
): CancelablePromise<{
success?: boolean;
error?: string | null;
user_id?: string | null;
}> {
return __request(OpenAPI, {
method: 'POST',
url: '/auth/sign-in',
body: requestBody,
mediaType: 'application/json',
errors: {
401: `Access denied due to invalid credentials`,
},
});
}
}