Ignore errors during nextcloud migration to be able to import files partially (#579)

*  Ignore errors during nextcloud migration to be able to import files partially for big migrations
* 👷 Fixed Nextcloud migration publishing script
* ✏️ Removed wrong comment
* 🐛 Fixed nextcloud migration, when there is a folder and a file with the same name
This commit is contained in:
Anton Shepilov
2024-09-05 15:29:25 +02:00
committed by GitHub
parent 81ee6c1673
commit 8b9fd36c8c
4 changed files with 145 additions and 9 deletions
@@ -60,8 +60,8 @@ app.post("/", async (req: Request, res: Response) => {
res.status(400).send("Username and password for nextcloud are required");
}
try {
await nextcloud.migrate(params.username, params.password, params.dir);
res.status(200).send("Sync DONE ✅");
const stats = await nextcloud.migrate(params.username, params.password, params.dir);
res.status(200).send(JSON.stringify(stats));
} catch (e) {
console.error(e)
res.status(500).send("Error during synchronization:: " + e.message)