feat: add show workspace names and members

This commit is contained in:
MingLiang Wang
2022-12-22 16:36:50 +08:00
parent b0e7362eff
commit 0d23cf31e3
13 changed files with 162 additions and 34 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ export interface GetUserByEmailParams {
}
export interface User {
id: number;
id: string;
name: string;
email: string;
avatar_url: string;
+20 -1
View File
@@ -46,7 +46,9 @@ export async function getWorkspaceDetail(
url: `/api/workspace/${params.id}`,
method: 'GET',
});
if (data.data?.owner.id) {
data.data.owner.id = String(data.data?.owner.id);
}
return data.data;
}
@@ -199,3 +201,20 @@ export async function downloadWorkspace(
return data.data;
}
export async function uploadBlob(params: { blob: Blob }): Promise<string> {
const data = await request({
url: '/api/blob',
method: 'PUT',
data: params.blob,
});
return data.data;
}
export async function getBlob(params: { blobId: string }): Promise<string> {
const data = await request({
url: `/api/blob/${params.blobId}`,
method: 'GET',
});
return data.data;
}