summaryrefslogtreecommitdiffstats
path: root/src/models/user.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/user.rs')
-rw-r--r--src/models/user.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/models/user.rs b/src/models/user.rs
index 7d336f9..fee6522 100644
--- a/src/models/user.rs
+++ b/src/models/user.rs
@@ -171,7 +171,7 @@ impl User {
impl UserList {
// Edit an user
- pub async fn edit_avatar(&mut self, avatar: String) -> Result<(), AppError> {
+ pub async fn edit_avatar(&mut self, avatar: Option<String>) -> Result<(), AppError> {
let pool = unsafe { get_client() };
sqlx::query!(
r#"
@@ -183,7 +183,7 @@ impl UserList {
.execute(pool)
.await?;
- self.avatar = Some(avatar);
+ self.avatar = avatar;
Ok(())
}