summaryrefslogtreecommitdiff
path: root/src/api/profile
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/profile')
-rw-r--r--src/api/profile/mod.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/api/profile/mod.rs b/src/api/profile/mod.rs
index 9abb872..ecfec12 100644
--- a/src/api/profile/mod.rs
+++ b/src/api/profile/mod.rs
@@ -290,8 +290,7 @@ pub(crate) async fn avatar_upload(
sha.update(&data);
let id = AvatarID(sha.finalize()[0..16].try_into().unwrap());
- db.set_user_avatar(&req.session, Avatar { id: id.clone(), data, content_type: ct.to_string() })
- .await?;
+ db.set_user_avatar(&req.session, Avatar { id, data, content_type: ct.to_string() }).await?;
match db.get_devices(&req.session).await {
Ok(devs) => defer.spawn_after_success("api::profile/avatar/upload(post)", {
let (pc, db) = (Arc::clone(pc), db_pool.clone());