|
|
@ -2,20 +2,20 @@ use std::collections::{HashMap, HashSet};
|
|
|
|
|
|
|
|
|
|
|
|
use chrono::{NaiveDateTime, Utc};
|
|
|
|
use chrono::{NaiveDateTime, Utc};
|
|
|
|
use futures::{stream, stream::StreamExt};
|
|
|
|
use futures::{stream, stream::StreamExt};
|
|
|
|
|
|
|
|
use rocket::fs::TempFile;
|
|
|
|
|
|
|
|
use rocket::serde::json::Json;
|
|
|
|
use rocket::{
|
|
|
|
use rocket::{
|
|
|
|
form::{Form, FromForm},
|
|
|
|
form::{Form, FromForm},
|
|
|
|
Route,
|
|
|
|
Route,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
use rocket::fs::TempFile;
|
|
|
|
|
|
|
|
use rocket::serde::json::Json;
|
|
|
|
|
|
|
|
use serde_json::Value;
|
|
|
|
use serde_json::Value;
|
|
|
|
|
|
|
|
|
|
|
|
use crate::{
|
|
|
|
use crate::{
|
|
|
|
api::{self, EmptyResult, JsonResult, JsonUpcase, Notify, PasswordData, UpdateType},
|
|
|
|
api::{self, EmptyResult, JsonResult, JsonUpcase, Notify, PasswordData, UpdateType},
|
|
|
|
auth::Headers,
|
|
|
|
auth::Headers,
|
|
|
|
CONFIG,
|
|
|
|
|
|
|
|
crypto,
|
|
|
|
crypto,
|
|
|
|
db::{DbConn, DbPool, models::*},
|
|
|
|
db::{models::*, DbConn, DbPool},
|
|
|
|
|
|
|
|
CONFIG,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
use super::folders::FolderData;
|
|
|
|
use super::folders::FolderData;
|
|
|
@ -805,7 +805,7 @@ async fn share_cipher_by_uuid(
|
|
|
|
nt,
|
|
|
|
nt,
|
|
|
|
UpdateType::CipherUpdate,
|
|
|
|
UpdateType::CipherUpdate,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.await?;
|
|
|
|
.await?;
|
|
|
|
|
|
|
|
|
|
|
|
Ok(Json(cipher.to_json(&headers.host, &headers.user.uuid, None, conn).await))
|
|
|
|
Ok(Json(cipher.to_json(&headers.host, &headers.user.uuid, None, conn).await))
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1001,7 +1001,7 @@ async fn save_attachment(
|
|
|
|
|
|
|
|
|
|
|
|
match data.data.persist_to(&file_path).await {
|
|
|
|
match data.data.persist_to(&file_path).await {
|
|
|
|
Ok(_result) => {}
|
|
|
|
Ok(_result) => {}
|
|
|
|
Err(_error) => data.data.move_copy_to(&file_path).await?
|
|
|
|
Err(_error) => data.data.move_copy_to(&file_path).await?,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
nt.send_cipher_update(UpdateType::CipherUpdate, &cipher, &cipher.update_users_revision(&conn).await).await;
|
|
|
|
nt.send_cipher_update(UpdateType::CipherUpdate, &cipher, &cipher.update_users_revision(&conn).await).await;
|
|
|
|