Skip to content

Commit

Permalink
Fix errors that occurred in the nightly build
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Thies committed Aug 4, 2021
1 parent dd98fe8 commit 42ba817
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/api/core/sends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ fn post_send(data: JsonUpcase<SendData>, headers: Headers, conn: DbConn, nt: Not
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)?;
nt.send_send_update(UpdateType::SyncSendCreate, &send, &send.update_users_revision(&conn));

Expand Down Expand Up @@ -210,7 +210,7 @@ fn post_send_file(data: Data, content_type: &ContentType, headers: Headers, conn
};

// 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();

if send.atype != SendType::File as i32 {
Expand Down
4 changes: 2 additions & 2 deletions src/db/models/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ impl Send {

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

0 comments on commit 42ba817

Please sign in to comment.