Added endpoints to server

This commit is contained in:
2025-03-15 21:17:10 +01:00
parent cf92b4ede4
commit 0c5b339c66

View File

@@ -1,6 +1,11 @@
mod users; mod users;
mod cases;
mod items;
mod types;
use users::*; use users::*;
use cases::*;
use items::*;
use actix_web::web::Data; use actix_web::web::Data;
use actix_web::{App, HttpServer}; use actix_web::{App, HttpServer};
@@ -26,6 +31,12 @@ async fn main() -> std::io::Result<()> {
.service(login) .service(login)
.service(register) .service(register)
.service(logout) .service(logout)
.service(get_case)
.service(get_cases)
.service(get_item)
.service(get_items)
.service(get_case_items)
.service(get_item_cases)
.app_data(app_state.clone()) .app_data(app_state.clone())
}) })
.bind(("127.0.0.1", 8000))? .bind(("127.0.0.1", 8000))?