Removed unimplemented functions

This commit is contained in:
2025-04-11 23:48:50 +02:00
parent 8d494c6756
commit 972a280229

View File

@@ -17,7 +17,8 @@ use sqlx::sqlite::SqlitePool;
#[derive(Clone)] #[derive(Clone)]
struct AppState { struct AppState {
database: SqlitePool, database: SqlitePool,
token_expiration: u64, jwt_token_expiration: u64,
refresh_token_expiration: u64,
allow_origins: Vec<&'static str>, allow_origins: Vec<&'static str>,
} }
@@ -28,7 +29,8 @@ async fn main() -> std::io::Result<()> {
.expect("Could not connect to db"); .expect("Could not connect to db");
let app_state = Data::new(AppState { let app_state = Data::new(AppState {
database: pool, database: pool,
token_expiration: 86400, jwt_token_expiration: 60,
refresh_token_expiration: 86400,
allow_origins: vec!["http://localhost:5173"], allow_origins: vec!["http://localhost:5173"],
}); });
HttpServer::new(move || { HttpServer::new(move || {
@@ -42,8 +44,6 @@ async fn main() -> std::io::Result<()> {
.add(("Access-Control-Allow-Credentials", "true")), .add(("Access-Control-Allow-Credentials", "true")),
) )
.service(login) .service(login)
.service(register)
.service(logout)
.service(get_case) .service(get_case)
.service(get_cases) .service(get_cases)
.service(get_item) .service(get_item)