From a71a2c2f48454460d53e8964d239f58976f43237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Fri, 1 Jun 2018 00:20:09 +0200 Subject: [PATCH] Added missing collections to /api/sync --- src/api/core/ciphers.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index d343704c..f6067d1f 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -29,6 +29,9 @@ fn sync(headers: Headers, conn: DbConn) -> JsonResult { let folders = Folder::find_by_user(&headers.user.uuid, &conn); let folders_json: Vec = folders.iter().map(|c| c.to_json()).collect(); + let collections = Collection::find_by_user_uuid(&headers.user.uuid, &conn); + let collections_json: Vec = collections.iter().map(|c| c.to_json()).collect(); + let ciphers = Cipher::find_by_user(&headers.user.uuid, &conn); let ciphers_json: Vec = ciphers.iter().map(|c| c.to_json(&headers.host, &headers.user.uuid, &conn)).collect(); @@ -37,6 +40,7 @@ fn sync(headers: Headers, conn: DbConn) -> JsonResult { Ok(Json(json!({ "Profile": user_json, "Folders": folders_json, + "Collections": collections_json, "Ciphers": ciphers_json, "Domains": domains_json, "Object": "sync"