mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
1280f96f37
* feat: implement space and workspace icons - Create reusable AvatarUploader component supporting avatars, space icons, and workspace icons - Add Sharp package for server-side image resizing and optimization - Create reusable AvatarUploader component supporting avatars, space icons, and workspace icons - Support removing icons * add workspace logo support - add upload loader - add white background to transparent image - other fixes and enhancements * dark mode * fixes * cleanup
13 lines
426 B
TypeScript
13 lines
426 B
TypeScript
import api from "@/lib/api-client";
|
|
import { ICurrentUser, IUser } from "@/features/user/types/user.types";
|
|
|
|
export async function getMyInfo(): Promise<ICurrentUser> {
|
|
const req = await api.post<ICurrentUser>("/users/me");
|
|
return req.data as ICurrentUser;
|
|
}
|
|
|
|
export async function updateUser(data: Partial<IUser>): Promise<IUser> {
|
|
const req = await api.post<IUser>("/users/update", data);
|
|
return req.data as IUser;
|
|
}
|