Implemented GET and PATCH handler

This commit is contained in:
Dennis Nemec
2025-10-06 00:27:27 +02:00
parent 98fb621108
commit 721fc171d0
7 changed files with 222 additions and 22 deletions

View File

@ -1,9 +1,9 @@
use crate::api::{handle_post, userinfo};
use crate::api::{handle_get, handle_patch, handle_post, userinfo};
use crate::config::load_config;
use crate::middleware::AppState;
use crate::repository::RedisRepository;
use crate::util::initialize_logging;
use axum::routing::{get, post};
use axum::routing::{get, patch, post};
use axum::{Extension, Router};
use axum_keycloak_auth::instance::{KeycloakAuthInstance, KeycloakConfig};
use axum_keycloak_auth::layer::KeycloakAuthLayer;
@ -53,6 +53,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let auth_router = auth::router(state.clone());
let proxy_router = Router::new()
.route("/{*wildcard}", post(handle_post))
.route("/{*wildcard}", get(handle_get))
.route("/{*wildcard}", patch(handle_patch))
.route("/userinfo", get(userinfo))
.route_layer(Extension(state.clone()))
.route_layer(axum::middleware::from_fn_with_state(