Add accepted organization data to sync response (#7666)

This commit is contained in:
Tom authored and GitHub committed 2026-09-18 16:53:17 +02:00
1 parent 9c8aa2359f
commit c3f5477525
4 files changed
+48

No files matched your search

+7
View File
@@ -162,6 +162,12 @@ async fn sync(data: SyncData, headers: Headers, client_version: Option<ClientVer
let policies_json: Vec<Value> =
OrgPolicy::find_confirmed_by_user(&headers.user.uuid, &conn).await.iter().map(OrgPolicy::to_json).collect();
let policies_new_json: Vec<Value> = OrgPolicy::find_accepted_and_confirmed_by_user(&headers.user.uuid, &conn)
.await
.iter()
.map(OrgPolicy::to_json)
.collect();
let domains_json = if data.exclude_domains {
Value::Null
} else {
@@ -194,6 +200,7 @@ async fn sync(data: SyncData, headers: Headers, client_version: Option<ClientVer
"folders": folders_json,
"collections": collections_json,
"policies": policies_json,
"policiesNew": policies_new_json,
"ciphers": ciphers_json,
"domains": domains_json,
"sends": sends_json,