feat: leave workspace

This commit is contained in:
MingLiang Wang
2022-12-23 15:38:50 +08:00
parent c604f35df1
commit 1ea4042933
4 changed files with 64 additions and 17 deletions
@@ -163,3 +163,10 @@ export async function getBlob(params: {
}): Promise<ArrayBuffer> {
return client.get(`/api/blob/${params.blobId}`).arrayBuffer();
}
export interface LeaveWorkspaceParams {
id: number | string;
}
export async function leaveWorkspace({ id }: LeaveWorkspaceParams) {
await client.delete(`/api/workspace/${id}/permission`).json();
}