Adds user authorization to the actix backend.

This commit is contained in:
2023-03-25 19:20:38 +01:00
parent 1c8110cdb0
commit 534e6867d8
11 changed files with 142 additions and 44 deletions

View File

@@ -5,7 +5,7 @@ use actix_web::HttpServer;
use actix_web::App;
use actix_web::web;
use diesel::PgConnection;
use request::{login, register};
use request::{login, register, gamenights};
use diesel::r2d2::ConnectionManager;
use diesel::r2d2::Pool;
@@ -28,6 +28,7 @@ async fn main() -> std::io::Result<()> {
.app_data(web::Data::new(pool.clone()))
.service(login)
.service(register)
.service(gamenights)
})
.bind(("::1", 8080))?
.run()