diff --git a/backend/LexBoxApi/Controllers/CrdtController.cs b/backend/LexBoxApi/Controllers/CrdtController.cs index d340ae458..6a601377d 100644 --- a/backend/LexBoxApi/Controllers/CrdtController.cs +++ b/backend/LexBoxApi/Controllers/CrdtController.cs @@ -6,6 +6,7 @@ using LexCore.ServiceInterfaces; using LexCore.Sync; using LexData; +using Microsoft.AspNetCore.Http.Timeouts; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.SignalR; using Microsoft.EntityFrameworkCore; @@ -88,8 +89,9 @@ public async Task> GetProjectId(string code) return Ok(projectId); } - [HttpPost("crdt-sync/{projectId}")] + [HttpPost("sync/{projectId}")] [AdminRequired] + [RequestTimeout(300_000)]//5 minutes public async Task> ExecuteMerge(Guid projectId) { var result = await fwHeadlessClient.CrdtSync(projectId); diff --git a/frontend/src/routes/(authenticated)/project/[project_code]/CrdtSyncButton.svelte b/frontend/src/routes/(authenticated)/project/[project_code]/CrdtSyncButton.svelte index 4c27935b3..324c40126 100644 --- a/frontend/src/routes/(authenticated)/project/[project_code]/CrdtSyncButton.svelte +++ b/frontend/src/routes/(authenticated)/project/[project_code]/CrdtSyncButton.svelte @@ -12,7 +12,7 @@ async function triggerSync(): Promise { syncing = true; try { - const response = await fetch(`/api/crdt/crdt-sync/${projectId}`, { + const response = await fetch(`/api/crdt/sync/${projectId}`, { method: 'POST', });