feat: global ui & functional update
This commit is contained in:
@@ -37,5 +37,22 @@ export const workspacesApi = {
|
||||
*/
|
||||
delete: (workspaceId: string) =>
|
||||
api.delete<void>(`${BASE_PATH}/${workspaceId}`),
|
||||
|
||||
/**
|
||||
* Upload workspace avatar
|
||||
*/
|
||||
uploadAvatar: (workspaceId: string, file: File) => {
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
return api.post<Workspace>(`${BASE_PATH}/${workspaceId}/avatar`, formData, {
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Delete workspace avatar
|
||||
*/
|
||||
deleteAvatar: (workspaceId: string) =>
|
||||
api.delete<Workspace>(`${BASE_PATH}/${workspaceId}/avatar`),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user