Implemented GET and PATCH handler
This commit is contained in:
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user