From ea603f83fd563ef2bf0e1b058eb66392c4806dd0 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sat, 6 Dec 2025 21:25:30 +0000 Subject: [PATCH] Fix HTTP method of the server --- frontend/sync-client/src/consts.ts | 2 +- frontend/test-client/src/cli.ts | 22 +++++++++++----------- sync-server/src/consts.rs | 2 +- sync-server/src/server.rs | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/frontend/sync-client/src/consts.ts b/frontend/sync-client/src/consts.ts index b90c48c3..da70ba47 100644 --- a/frontend/sync-client/src/consts.ts +++ b/frontend/sync-client/src/consts.ts @@ -2,5 +2,5 @@ export const TIMEOUT_FOR_MERGING_HISTORY_ENTRIES_IN_SECONDS = 60; export const DIFF_CACHE_SIZE_MB = 2; export const MAX_LOG_MESSAGE_COUNT = 100000; export const MAX_HISTORY_ENTRY_COUNT = 5000; -export const SUPPORTED_API_VERSION = 1; +export const SUPPORTED_API_VERSION = 2; export const WEBSOCKET_DISCONNECT_TIMEOUT_IN_S = 10; diff --git a/frontend/test-client/src/cli.ts b/frontend/test-client/src/cli.ts index 08dbf472..ca433300 100644 --- a/frontend/test-client/src/cli.ts +++ b/frontend/test-client/src/cli.ts @@ -118,22 +118,12 @@ async function runTest({ async function runTests(): Promise { for (let i = 0; i < TEST_ITERATIONS; i++) { - await runTest({ - agentCount: 2, - concurrency: 16, - iterations: 100, - doDeletes: true, - doResets: true, - useSlowFileEvents: true, - jitterScaleInSeconds: 0.75 - }); - for (const useSlowFileEvents of [false, true]) { for (const concurrency of [ 16, 1 // test with concurrency 1 to check for deadlocks ]) { - for (const doDeletes of [true, false]) { + for (const doDeletes of [false, true]) { await runTest({ agentCount: 2, concurrency, @@ -146,6 +136,16 @@ async function runTests(): Promise { } } } + + await runTest({ + agentCount: 2, + concurrency: 16, + iterations: 100, + doDeletes: true, + doResets: true, + useSlowFileEvents: true, + jitterScaleInSeconds: 0.75 + }); } } diff --git a/sync-server/src/consts.rs b/sync-server/src/consts.rs index 3c672520..0d4e67a1 100644 --- a/sync-server/src/consts.rs +++ b/sync-server/src/consts.rs @@ -17,4 +17,4 @@ pub const DEFAULT_LOG_ROTATION_INTERVAL: Duration = Duration::from_secs(60 * 60 pub const DEFAULT_MERGEABLE_FILE_EXTENSIONS: &[&str] = &["md", "txt"]; -pub const SUPPORTED_API_VERSION: u32 = 1; +pub const SUPPORTED_API_VERSION: u32 = 2; diff --git a/sync-server/src/server.rs b/sync-server/src/server.rs index a5506683..168f1253 100644 --- a/sync-server/src/server.rs +++ b/sync-server/src/server.rs @@ -126,11 +126,11 @@ fn get_authed_routes(app_state: AppState) -> Router { ) .route( "/vaults/:vault_id/documents/:document_id/versions/:version_id", - put(fetch_document_version::fetch_document_version), + get(fetch_document_version::fetch_document_version), ) .route( "/vaults/:vault_id/documents/:document_id/versions/:version_id/content", - put(fetch_document_version_content::fetch_document_version_content), + get(fetch_document_version_content::fetch_document_version_content), ) .route( "/vaults/:vault_id/documents/:document_id",