From d9457e929ce5294ee51431cfa522b674e668227b Mon Sep 17 00:00:00 2001 From: Miroslav Prasil Date: Mon, 1 Oct 2018 17:02:58 +0100 Subject: [PATCH] Add continuation token when we return object list --- src/api/core/ciphers.rs | 1 + src/api/core/folders.rs | 1 + src/api/core/organizations.rs | 13 +++++++++---- src/api/core/two_factor.rs | 3 ++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index 66c7c88..80ecd6d 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -57,6 +57,7 @@ fn get_ciphers(headers: Headers, conn: DbConn) -> JsonResult { Ok(Json(json!({ "Data": ciphers_json, "Object": "list", + "ContinuationToken": null }))) } diff --git a/src/api/core/folders.rs b/src/api/core/folders.rs index 47ff226..6532a7e 100644 --- a/src/api/core/folders.rs +++ b/src/api/core/folders.rs @@ -16,6 +16,7 @@ fn get_folders(headers: Headers, conn: DbConn) -> JsonResult { Ok(Json(json!({ "Data": folders_json, "Object": "list", + "ContinuationToken": null, }))) } diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs index 687ee35..e0ef3cb 100644 --- a/src/api/core/organizations.rs +++ b/src/api/core/organizations.rs @@ -141,7 +141,8 @@ fn get_user_collections(headers: Headers, conn: DbConn) -> JsonResult { .iter() .map(Collection::to_json) .collect::(), - "Object": "list" + "Object": "list", + "ContinuationToken": null, }))) } @@ -153,7 +154,8 @@ fn get_org_collections(org_id: String, _headers: AdminHeaders, conn: DbConn) -> .iter() .map(Collection::to_json) .collect::(), - "Object": "list" + "Object": "list", + "ContinuationToken": null, }))) } @@ -294,7 +296,8 @@ fn get_collection_users(org_id: String, coll_id: String, _headers: AdminHeaders, Ok(Json(json!({ "Data": user_list, - "Object": "list" + "Object": "list", + "ContinuationToken": null, }))) } @@ -312,6 +315,7 @@ fn get_org_details(data: OrgIdData, headers: Headers, conn: DbConn) -> JsonResul Ok(Json(json!({ "Data": ciphers_json, "Object": "list", + "ContinuationToken": null, }))) } @@ -327,7 +331,8 @@ fn get_org_users(org_id: String, headers: AdminHeaders, conn: DbConn) -> JsonRes Ok(Json(json!({ "Data": users_json, - "Object": "list" + "Object": "list", + "ContinuationToken": null, }))) } diff --git a/src/api/core/two_factor.rs b/src/api/core/two_factor.rs index a6446fd..010dbbf 100644 --- a/src/api/core/two_factor.rs +++ b/src/api/core/two_factor.rs @@ -19,7 +19,8 @@ fn get_twofactor(headers: Headers, conn: DbConn) -> JsonResult { Ok(Json(json!({ "Data": twofactors_json, - "Object": "list" + "Object": "list", + "ContinuationToken": null, }))) }