diff --git a/src/api.rs b/src/api.rs index d28b47f..73f2b0a 100644 --- a/src/api.rs +++ b/src/api.rs @@ -234,7 +234,6 @@ fn auth( credentials: Json, mut cookies: Cookies, ) -> Result, errors::Error> { - if !user::auth::(&db, &credentials.username, &credentials.password)? { bail!(errors::ErrorKind::IncorrectCredentials) } diff --git a/src/lastfm.rs b/src/lastfm.rs index 0f45554..3236e4d 100644 --- a/src/lastfm.rs +++ b/src/lastfm.rs @@ -60,12 +60,7 @@ where let mut scrobbler = Scrobbler::new(LASTFM_API_KEY.into(), LASTFM_API_SECRET.into()); let auth_response = scrobbler.authenticate_with_token(token.to_string())?; - user::lastfm_link( - db, - username, - &auth_response.name, - &auth_response.key, - ) + user::lastfm_link(db, username, &auth_response.name, &auth_response.key) } pub fn unlink(db: &T, username: &str) -> Result<(), errors::Error>