unnecesary methods removed

This commit is contained in:
franklinblanco 2022-07-07 20:27:30 -04:00
parent 813745b0cc
commit 589c206e9f
2 changed files with 2 additions and 12 deletions

View File

@ -17,12 +17,4 @@ pub async fn delete_expired_tokens(conn: &mut MySqlConnection) -> Result<MySqlQu
sqlx::query_file!("sql/schema/token/delete_expired_tokens.sql",
AUTH_TOKEN_EXPIRATION_TIME_IN_DAYS, REFRESH_TOKEN_EXPIRATION_TIME_IN_DAYS)
.execute(conn).await
}
pub async fn _is_auth_token_expired(_conn: &mut MySqlConnection, _token_id: &i32) -> Result<(), sqlx::Error>{
Ok(())
}
pub async fn _is_refresh_token_expired(_conn: &mut MySqlConnection, _token_id: &i32) -> Result<(), sqlx::Error>{
Ok(())
}
//TODO: is auth token expired
//TODO: is refresh token expired
}

View File

@ -202,9 +202,7 @@ pub async fn refresh_auth_token(request: HttpRequest, user_id: web::Path<i32>, d
message_resources.push(MessageResourceDto::new_from_error_message(ERROR_EXPIRED_TOKEN));
return HttpResponse::Unauthorized().json(web::Json(message_resources));
},
false => {}
}
};
false => {}}};
match matched_token {
Some(token) => {token},
None => {