mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-16 22:07:09 +08:00
refactor(core): initial multiple servers infra (#8745)
This is the initial refactoring of affine to support multiple servers, but many more changes are needed to make multi-server actually work.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* for support arraybuffer response type
|
||||
*/
|
||||
import { FetchProvider } from '@affine/core/modules/cloud/provider/fetch';
|
||||
import { RawFetchProvider } from '@affine/core/modules/cloud/provider/fetch';
|
||||
import { CapacitorHttp } from '@capacitor/core';
|
||||
import type { Framework } from '@toeverything/infra';
|
||||
|
||||
@@ -121,7 +121,7 @@ function base64ToUint8Array(base64: string) {
|
||||
return new Uint8Array(binaryArray);
|
||||
}
|
||||
export function configureFetchProvider(framework: Framework) {
|
||||
framework.override(FetchProvider, {
|
||||
framework.override(RawFetchProvider, {
|
||||
fetch: async (input, init) => {
|
||||
const request = new Request(input, init);
|
||||
const { method } = request;
|
||||
|
||||
Reference in New Issue
Block a user