From daa66b08dc1c21f38710f8791d45f188702ccd17 Mon Sep 17 00:00:00 2001 From: janost Date: Fri, 19 Oct 2018 00:54:40 +0200 Subject: [PATCH] Fix /sync without query string --- src/api/core/ciphers.rs | 7 +++++++ src/api/core/mod.rs | 1 + 2 files changed, 8 insertions(+) diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index 6a8a1c02..d86e41dc 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -53,6 +53,13 @@ fn sync(data: SyncData, headers: Headers, conn: DbConn) -> JsonResult { }))) } +#[get("/sync")] +fn sync_no_query(headers: Headers, conn: DbConn) -> JsonResult { + let sync_data = SyncData { + excludeDomains: false, + }; + sync(sync_data, headers, conn) +} #[get("/ciphers")] fn get_ciphers(headers: Headers, conn: DbConn) -> JsonResult { diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs index a59b19ea..f8f65000 100644 --- a/src/api/core/mod.rs +++ b/src/api/core/mod.rs @@ -30,6 +30,7 @@ pub fn routes() -> Vec { prelogin, sync, + sync_no_query, get_ciphers, get_cipher,