From 94bb1371faa69e13cf7ad388676593511fb76970 Mon Sep 17 00:00:00 2001 From: StNicolay Date: Sat, 3 Aug 2024 21:05:28 +0300 Subject: [PATCH] Switched auth_post to accept a form instead of a json --- src/endpoints/authorization/auth_post.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/endpoints/authorization/auth_post.rs b/src/endpoints/authorization/auth_post.rs index 817a310..72381bc 100644 --- a/src/endpoints/authorization/auth_post.rs +++ b/src/endpoints/authorization/auth_post.rs @@ -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, - Json(payload): Json, + Form(payload): Form, ) -> Result, Error> { let user_id = authenticate_user(&payload.username, &payload.password, &state.pool) .await