This commit is contained in:
Daniel García committed 2021-03-14 23:35:55 +01:00
1 parent 2969e87b52
commit 8da5b99482
20 files changed
+812 -2

No files matched your search

+7
View File
@@ -104,6 +104,12 @@ fn sync(data: Form<SyncData>, headers: Headers, conn: DbConn) -> JsonResult {
.map(|c| c.to_json(&headers.host, &headers.user.uuid, &conn))
.collect();
let sends = Send::find_by_user(&headers.user.uuid, &conn);
let sends_json: Vec<Value> = sends
.iter()
.map(|s| s.to_json())
.collect();
let domains_json = if data.exclude_domains {
Value::Null
} else {
@@ -117,6 +123,7 @@ fn sync(data: Form<SyncData>, headers: Headers, conn: DbConn) -> JsonResult {
"Policies": policies_json,
"Ciphers": ciphers_json,
"Domains": domains_json,
"Sends": sends_json,
"Object": "sync"
})))
}