1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-11-29 06:20:29 +01:00

Fix errors that occurred in the nightly build

Dieser Commit ist enthalten in:
Fabian Thies 2021-08-04 13:25:41 +02:00
Ursprung dd98fe860b
Commit 42ba817a4c
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -167,7 +167,7 @@ fn post_send(data: JsonUpcase<SendData>, headers: Headers, conn: DbConn, nt: Not
err!("File sends should use /api/sends/file") err!("File sends should use /api/sends/file")
} }
let mut send = create_send(data, headers.user.uuid.clone())?; let mut send = create_send(data, headers.user.uuid)?;
send.save(&conn)?; send.save(&conn)?;
nt.send_send_update(UpdateType::SyncSendCreate, &send, &send.update_users_revision(&conn)); nt.send_send_update(UpdateType::SyncSendCreate, &send, &send.update_users_revision(&conn));
@ -210,7 +210,7 @@ fn post_send_file(data: Data, content_type: &ContentType, headers: Headers, conn
}; };
// Create the Send // Create the Send
let mut send = create_send(data.data, headers.user.uuid.clone())?; let mut send = create_send(data.data, headers.user.uuid)?;
let file_id = crate::crypto::generate_send_id(); let file_id = crate::crypto::generate_send_id();
if send.atype != SendType::File as i32 { if send.atype != SendType::File as i32 {

Datei anzeigen

@ -234,8 +234,8 @@ impl Send {
pub fn update_users_revision(&self, conn: &DbConn) -> Vec<String> { pub fn update_users_revision(&self, conn: &DbConn) -> Vec<String> {
let mut user_uuids = Vec::new(); let mut user_uuids = Vec::new();
match self.user_uuid { match &self.user_uuid {
Some(ref user_uuid) => { Some(user_uuid) => {
User::update_uuid_revision(user_uuid, conn); User::update_uuid_revision(user_uuid, conn);
user_uuids.push(user_uuid.clone()) user_uuids.push(user_uuid.clone())
} }