rename API files
This commit is contained in:
parent
c8b8435b69
commit
c3998ca039
11 changed files with 46 additions and 36 deletions
|
|
@ -1,7 +1,8 @@
|
|||
import {apiClient} from "../apiClient";
|
||||
import type {UserDto} from "../dtos/UserDto";
|
||||
import type {CreateUserRequestDto} from "../dtos/CreateUserRequestDto";
|
||||
import type {ChangeUserPasswordRequestDto} from "../dtos/ChangeUserPasswordRequestDto";
|
||||
import type {CreateUserRequest} from "../dtos/CreateUserRequest.ts";
|
||||
import type {ChangeUserPasswordRequest} from "../dtos/ChangeUserPasswordRequest.ts";
|
||||
import type {CreateUserResponse} from "../dtos/CreateUserResponse.ts";
|
||||
|
||||
export async function fetchCurrentUser(): Promise<UserDto> {
|
||||
return apiClient.get("/user/me");
|
||||
|
|
@ -11,7 +12,7 @@ export async function fetchAllUsers(): Promise<UserDto[]> {
|
|||
return apiClient.get("/user/list");
|
||||
}
|
||||
|
||||
export async function createUser(dto: CreateUserRequestDto): Promise<UserDto> {
|
||||
export async function createUser(dto: CreateUserRequest): Promise<CreateUserResponse> {
|
||||
return apiClient.post("/user/create", dto);
|
||||
}
|
||||
|
||||
|
|
@ -19,6 +20,6 @@ export async function updateUser(dto: UserDto): Promise<UserDto> {
|
|||
return apiClient.post("/user/update", dto);
|
||||
}
|
||||
|
||||
export async function changePassword(dto: ChangeUserPasswordRequestDto) {
|
||||
export async function changePassword(dto: ChangeUserPasswordRequest) {
|
||||
return apiClient.post("/user/change-password", dto);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue