20 lines
526 B
TypeScript
20 lines
526 B
TypeScript
import { DashboardService, LoginService, UserService } from "@/client";
|
|
import { AuthAPI } from "../api-definition";
|
|
|
|
export const RealAuthAPI: AuthAPI = {
|
|
async getCurrentUser() {
|
|
return DashboardService.userGetUser();
|
|
},
|
|
async registerUser(data) {
|
|
await DashboardService.userRegister({ requestBody: data });
|
|
},
|
|
async loginUser(data) {
|
|
return LoginService.dashboardLoginAccessToken({
|
|
formData: data.formData,
|
|
});
|
|
},
|
|
async updateUser(data) {
|
|
await UserService.userUpdateUser({ requestBody: data });
|
|
},
|
|
};
|