my-app 0.1.0

A web application providing user management and authentication
Documentation
1
2
3
4
5
6
7
8
9
use actix_web::{HttpResponse, Responder};
use crate::account::services;

pub async fn login() -> impl Responder {
    match services::generate_jwt("user_id") {
        Ok(token) => HttpResponse::Ok().body(token),
        Err(_) => HttpResponse::InternalServerError().finish(),
    }
}