mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-15 17:21:04 +10:00
switch to nx monorepo
This commit is contained in:
12
apps/client/src/features/auth/services/auth-service.ts
Normal file
12
apps/client/src/features/auth/services/auth-service.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import api from "@/lib/api-client";
|
||||
import { ILogin, IRegister, ITokenResponse } from "@/features/auth/types/auth.types";
|
||||
|
||||
export async function login(data: ILogin): Promise<ITokenResponse>{
|
||||
const req = await api.post<ITokenResponse>("/auth/login", data);
|
||||
return req.data as ITokenResponse;
|
||||
}
|
||||
|
||||
export async function register(data: IRegister): Promise<ITokenResponse>{
|
||||
const req = await api.post<ITokenResponse>("/auth/register", data);
|
||||
return req.data as ITokenResponse;
|
||||
}
|
||||
Reference in New Issue
Block a user