Switched auth_post to accept a form instead of a json
This commit is contained in:
parent
0614c4cad0
commit
94bb1371fa
@ -1,3 +1,4 @@
|
||||
use axum::Form;
|
||||
use chrono::TimeDelta;
|
||||
|
||||
use crate::{
|
||||
@ -19,7 +20,7 @@ fn get_exp() -> i64 {
|
||||
|
||||
pub async fn post(
|
||||
State(state): State<AppState>,
|
||||
Json(payload): Json<Params>,
|
||||
Form(payload): Form<Params>,
|
||||
) -> Result<Json<Token>, Error> {
|
||||
let user_id = authenticate_user(&payload.username, &payload.password, &state.pool)
|
||||
.await
|
||||
|
Reference in New Issue
Block a user