feat: add support for user registration toggle and Traefik integration in Docker setup
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
use axum::{Json, Router, routing::get};
|
||||
use axum::{Json, Router, extract::State, routing::get};
|
||||
use std::sync::Arc;
|
||||
use crate::config::Config;
|
||||
use crate::dto::ConfigResponse;
|
||||
use crate::state::AppState;
|
||||
|
||||
@@ -6,8 +8,8 @@ pub fn router() -> Router<AppState> {
|
||||
Router::new().route("/", get(get_config))
|
||||
}
|
||||
|
||||
async fn get_config() -> Json<ConfigResponse> {
|
||||
async fn get_config(State(config): State<Arc<Config>>) -> Json<ConfigResponse> {
|
||||
Json(ConfigResponse {
|
||||
allow_registration: true, // Default to true for template
|
||||
allow_registration: config.allow_registration,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user