Started working on a cli frontend.

This commit is contained in:
2025-04-23 20:27:06 +02:00
parent 02913c7b52
commit db25dc0aed
49 changed files with 3838 additions and 59 deletions

View File

@@ -1,6 +1,6 @@
use actix_web::http::header::ContentType;
use actix_web::{web, post, HttpResponse, Responder};
use actix_web::{web, get, post, HttpResponse, Responder};
use validator::ValidateArgs;
use crate::DbPool;
use crate::request::requests::{Login, Register, RegisterContext};
@@ -30,7 +30,7 @@ impl Into<schema::user::Register> for Register {
}
}
#[post("/token")]
#[get("/token")]
pub async fn login(pool: web::Data<DbPool>, login_data: web::Json<Login>) -> Result<impl Responder, ApiError> {
let data = login_data.into_inner();