Skip to content

Commit

Permalink
Update ee/tabby-webserver/src/service/auth.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys authored Mar 29, 2024
1 parent 87babd8 commit 140bfd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ee/tabby-webserver/src/service/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl AuthenticationService for AuthenticationServiceImpl {

async fn update_user_avatar(&self, id: &ID, avatar: Option<Box<[u8]>>) -> Result<()> {
if avatar.as_ref().is_some_and(|v| v.len() > 512 * 1024) {
return Err(anyhow!("Avatar cannot be larger than 512KB").into());
return Err(anyhow!("The image you are attempting to upload is too large. Please ensure the file size is under 512KB").into());
}

Check warning on line 196 in ee/tabby-webserver/src/service/auth.rs

View check run for this annotation

Codecov / codecov/patch

ee/tabby-webserver/src/service/auth.rs#L194-L196

Added lines #L194 - L196 were not covered by tests
let id = id.as_rowid()?;
self.db.update_user_avatar(id, avatar).await?;
Expand Down

0 comments on commit 140bfd3

Please sign in to comment.