Can get user information

This commit is contained in:
2023-05-31 15:52:49 +02:00
parent 652541cd59
commit c0f120bb53
7 changed files with 98 additions and 9 deletions

View File

@ -2,7 +2,7 @@ use actix_remote_ip::RemoteIPConfig;
use actix_web::middleware::Logger;
use actix_web::{web, App, HttpServer};
use geneit_backend::app_config::AppConfig;
use geneit_backend::controllers::{auth_controller, config_controller};
use geneit_backend::controllers::{auth_controller, config_controller, user_controller};
#[actix_web::main]
async fn main() -> std::io::Result<()> {
@ -43,6 +43,8 @@ async fn main() -> std::io::Result<()> {
"/auth/password_login",
web::post().to(auth_controller::password_login),
)
// User controller
.route("/user/info", web::get().to(user_controller::auth_info))
})
.bind(AppConfig::get().listen_address.as_str())?
.run()