refactor: remove package @affine/datacenter (#1705)

This commit is contained in:
Himself65
2023-03-27 17:48:22 -05:00
committed by GitHub
parent 021bf6534b
commit ed29c5fbd9
87 changed files with 187 additions and 5231 deletions

View File

@@ -295,13 +295,14 @@ export function createWorkspaceApis(prefixUrl = '/') {
throw new RequestError(MessageCode.acceptInvitingFailed, e);
});
},
uploadBlob: async (params: { blob: Blob }): Promise<string> => {
uploadBlob: async (workspaceId: string, blob: Blob): Promise<string> => {
const auth = getLoginStorage();
assertExists(auth);
return fetch(prefixUrl + 'api/blob', {
method: 'PUT',
body: params.blob,
body: blob,
headers: {
'Content-Type': blob.type,
Authorization: auth.token,
},
}).then(r => r.text());