mirror of
https://github.com/strapi/strapi.git
synced 2025-11-10 07:10:11 +00:00
fix
This commit is contained in:
parent
4190687975
commit
777f76a0df
@ -179,7 +179,7 @@ const createTransferController =
|
|||||||
const payload = JSON.stringify({
|
const payload = JSON.stringify({
|
||||||
uuid,
|
uuid,
|
||||||
data: data ?? {},
|
data: data ?? {},
|
||||||
error: e,
|
error: JSON.stringify(e?.message),
|
||||||
});
|
});
|
||||||
|
|
||||||
ws.send(payload, (error) => (error ? reject(error) : resolve()));
|
ws.send(payload, (error) => (error ? reject(error) : resolve()));
|
||||||
@ -210,7 +210,7 @@ const createTransferController =
|
|||||||
};
|
};
|
||||||
|
|
||||||
const init = (msg: InitMessage) => {
|
const init = (msg: InitMessage) => {
|
||||||
const { kind, options: controllerOptions } = msg;
|
const { kind, data: controllerOptions } = msg;
|
||||||
|
|
||||||
if (state.controller) {
|
if (state.controller) {
|
||||||
throw new Error('Transfer already in progres');
|
throw new Error('Transfer already in progres');
|
||||||
|
|||||||
@ -28,8 +28,8 @@ export type PushTransferStage = PushTransferMessage['stage'];
|
|||||||
|
|
||||||
// init should return a transfer ID used in the teardown
|
// init should return a transfer ID used in the teardown
|
||||||
export type InitMessage = { type: 'init' } & (
|
export type InitMessage = { type: 'init' } & (
|
||||||
| { kind: 'pull'; options: EmptyObject }
|
| { kind: 'pull'; data: EmptyObject }
|
||||||
| { kind: 'push'; options: Pick<ILocalStrapiDestinationProviderOptions, 'strategy' | 'restore'> }
|
| { kind: 'push'; data: Pick<ILocalStrapiDestinationProviderOptions, 'strategy' | 'restore'> }
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user