feat(client): add userEdit

This commit is contained in:
2025-06-26 16:15:03 +05:00
parent 0eed0b0f20
commit 9c9201f130
4 changed files with 63 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
import api from '@/api/api';
import { AllUserResponse, User, UserCreate } from '@/types/user';
import { AllUserResponse, User, UserCreate, UserUpdate } from '@/types/user';
export class UserService {
static async getProfile(): Promise<User> {
@@ -29,4 +29,10 @@ export class UserService {
const createdUser = api.createUser(user);
return createdUser;
}
static async updateUser(userId: number, user: UserUpdate): Promise<User> {
console.log('updateUser');
const updatedUser = api.updateUser(userId, user);
return updatedUser;
}
}