fix: when moving folders the targetParentId was always missing, resulting in the folder not being moved
This commit is contained in:
parent
25b56f585e
commit
877b4fec7e
1 changed files with 3 additions and 1 deletions
|
|
@ -161,7 +161,9 @@ export function createFolderFileProvider(): TreeNodeProvider {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
ids.map((id) => {
|
ids.map((id) => {
|
||||||
if (_isFile(id)) return api.put(`/api/files/${id}`, { folderId: targetParentId });
|
if (_isFile(id)) return api.put(`/api/files/${id}`, { folderId: targetParentId });
|
||||||
return api.post(`/api/files/folders/${id}/move`, { targetParentId });
|
return api.post(`/api/files/folders/${id}/move`, {
|
||||||
|
parentId: targetParentId,
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue