Formatting
This commit is contained in:
parent
c1c70d4fbf
commit
ed81d24b7b
2 changed files with 1 additions and 7 deletions
|
@ -234,7 +234,6 @@ fn auth(
|
|||
credentials: Json<AuthCredentials>,
|
||||
mut cookies: Cookies,
|
||||
) -> Result<Json<AuthOutput>, errors::Error> {
|
||||
|
||||
if !user::auth::<DB>(&db, &credentials.username, &credentials.password)? {
|
||||
bail!(errors::ErrorKind::IncorrectCredentials)
|
||||
}
|
||||
|
|
|
@ -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<T>(db: &T, username: &str) -> Result<(), errors::Error>
|
||||
|
|
Loading…
Add table
Reference in a new issue