diff --git a/backend/src/api/license.rs b/backend/src/api/license.rs index 34cab19..aa3cc16 100644 --- a/backend/src/api/license.rs +++ b/backend/src/api/license.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use axum::{ routing::{get, post, put}, - Router, + Json, Router, }; use crate::models::error::ApiResult; @@ -17,22 +17,22 @@ pub fn router() -> Router> { .route("/custom-domain", put(update_custom_domain)) } -async fn get_license_info() -> ApiResult { - todo!() +async fn get_license_info() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn activate_license() -> ApiResult { - todo!() +async fn activate_license() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn check_in() -> ApiResult { - todo!() +async fn check_in() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn update_subdomain() -> ApiResult { - todo!() +async fn update_subdomain() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn update_custom_domain() -> ApiResult { - todo!() +async fn update_custom_domain() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } diff --git a/backend/src/api/logs.rs b/backend/src/api/logs.rs index 05f65f5..6a69fc3 100644 --- a/backend/src/api/logs.rs +++ b/backend/src/api/logs.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use axum::{ routing::get, - Router, + Json, Router, }; use crate::models::error::ApiResult; @@ -14,10 +14,10 @@ pub fn router() -> Router> { .route("/export", get(export_logs)) } -async fn query_logs() -> ApiResult { - todo!() +async fn query_logs() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn export_logs() -> ApiResult { - todo!() +async fn export_logs() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } diff --git a/backend/src/api/maps.rs b/backend/src/api/maps.rs index 448769b..bfc75c0 100644 --- a/backend/src/api/maps.rs +++ b/backend/src/api/maps.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use axum::{ routing::{delete, get, post, put}, - Router, + Json, Router, }; use crate::models::error::ApiResult; @@ -19,30 +19,30 @@ pub fn router() -> Router> { .route("/rotation/{server_id}", put(update_map_rotation)) } -async fn list_maps() -> ApiResult { - todo!() +async fn list_maps() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn upload_map() -> ApiResult { - todo!() +async fn upload_map() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_map() -> ApiResult { - todo!() +async fn get_map() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn delete_map() -> ApiResult { - todo!() +async fn delete_map() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn download_map() -> ApiResult { - todo!() +async fn download_map() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_map_rotation() -> ApiResult { - todo!() +async fn get_map_rotation() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn update_map_rotation() -> ApiResult { - todo!() +async fn update_map_rotation() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } diff --git a/backend/src/api/notifications.rs b/backend/src/api/notifications.rs index 6d89a24..bcddc7a 100644 --- a/backend/src/api/notifications.rs +++ b/backend/src/api/notifications.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use axum::{ routing::{get, post, put}, - Router, + Json, Router, }; use crate::models::error::ApiResult; @@ -16,18 +16,18 @@ pub fn router() -> Router> { .route("/test/pushbullet", post(test_pushbullet)) } -async fn get_notification_config() -> ApiResult { - todo!() +async fn get_notification_config() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn update_notification_config() -> ApiResult { - todo!() +async fn update_notification_config() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn test_discord() -> ApiResult { - todo!() +async fn test_discord() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn test_pushbullet() -> ApiResult { - todo!() +async fn test_pushbullet() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } diff --git a/backend/src/api/panels.rs b/backend/src/api/panels.rs index d10c63c..ba7d699 100644 --- a/backend/src/api/panels.rs +++ b/backend/src/api/panels.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use axum::{ routing::{delete, get, post, put}, - Router, + Json, Router, }; use crate::models::error::ApiResult; @@ -18,26 +18,26 @@ pub fn router() -> Router> { .route("/{id}/discover", get(discover_panel)) } -async fn list_panels() -> ApiResult { - todo!() +async fn list_panels() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn create_panel() -> ApiResult { - todo!() +async fn create_panel() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn update_panel() -> ApiResult { - todo!() +async fn update_panel() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn delete_panel() -> ApiResult { - todo!() +async fn delete_panel() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn test_panel() -> ApiResult { - todo!() +async fn test_panel() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn discover_panel() -> ApiResult { - todo!() +async fn discover_panel() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } diff --git a/backend/src/api/plugins.rs b/backend/src/api/plugins.rs index b26275a..05c86da 100644 --- a/backend/src/api/plugins.rs +++ b/backend/src/api/plugins.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use axum::{ routing::{delete, get, post, put}, - Router, + Json, Router, }; use crate::models::error::ApiResult; @@ -18,26 +18,26 @@ pub fn router() -> Router> { .route("/search", get(search_umod)) } -async fn list_plugins() -> ApiResult { - todo!() +async fn list_plugins() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn install_plugin() -> ApiResult { - todo!() +async fn install_plugin() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn update_plugin() -> ApiResult { - todo!() +async fn update_plugin() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn delete_plugin() -> ApiResult { - todo!() +async fn delete_plugin() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn reload_plugin() -> ApiResult { - todo!() +async fn reload_plugin() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn search_umod() -> ApiResult { - todo!() +async fn search_umod() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } diff --git a/backend/src/api/public.rs b/backend/src/api/public.rs index d844a20..d752263 100644 --- a/backend/src/api/public.rs +++ b/backend/src/api/public.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use axum::{ routing::get, - Router, + Json, Router, }; use crate::models::error::ApiResult; @@ -21,38 +21,38 @@ pub fn router() -> Router> { .route("/servers/{id}/store", get(get_store)) } -async fn list_public_servers() -> ApiResult { - todo!() +async fn list_public_servers() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_public_server() -> ApiResult { - todo!() +async fn get_public_server() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_wipe_schedule() -> ApiResult { - todo!() +async fn get_wipe_schedule() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_countdown() -> ApiResult { - todo!() +async fn get_countdown() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_current_map() -> ApiResult { - todo!() +async fn get_current_map() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_players() -> ApiResult { - todo!() +async fn get_players() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_mods() -> ApiResult { - todo!() +async fn get_mods() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_motd() -> ApiResult { - todo!() +async fn get_motd() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_store() -> ApiResult { - todo!() +async fn get_store() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } diff --git a/backend/src/api/schedules.rs b/backend/src/api/schedules.rs index d458047..bc49681 100644 --- a/backend/src/api/schedules.rs +++ b/backend/src/api/schedules.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use axum::{ routing::{delete, get, post, put}, - Router, + Json, Router, }; use crate::models::error::ApiResult; @@ -20,34 +20,34 @@ pub fn router() -> Router> { .route("/conflicts", get(get_conflicts)) } -async fn list_schedules() -> ApiResult { - todo!() +async fn list_schedules() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn create_schedule() -> ApiResult { - todo!() +async fn create_schedule() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_schedule() -> ApiResult { - todo!() +async fn get_schedule() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn update_schedule() -> ApiResult { - todo!() +async fn update_schedule() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn delete_schedule() -> ApiResult { - todo!() +async fn delete_schedule() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn toggle_schedule() -> ApiResult { - todo!() +async fn toggle_schedule() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_calendar() -> ApiResult { - todo!() +async fn get_calendar() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_conflicts() -> ApiResult { - todo!() +async fn get_conflicts() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } diff --git a/backend/src/api/store.rs b/backend/src/api/store.rs index 46a34f9..a24ec54 100644 --- a/backend/src/api/store.rs +++ b/backend/src/api/store.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use axum::{ routing::{delete, get, post, put}, - Router, + Json, Router, }; use crate::models::error::ApiResult; @@ -24,50 +24,50 @@ pub fn router() -> Router> { .route("/webhook/paypal", post(paypal_webhook)) } -async fn get_store_config() -> ApiResult { - todo!() +async fn get_store_config() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn update_store_config() -> ApiResult { - todo!() +async fn update_store_config() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn list_categories() -> ApiResult { - todo!() +async fn list_categories() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn create_category() -> ApiResult { - todo!() +async fn create_category() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn update_category() -> ApiResult { - todo!() +async fn update_category() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn delete_category() -> ApiResult { - todo!() +async fn delete_category() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn list_items() -> ApiResult { - todo!() +async fn list_items() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn create_item() -> ApiResult { - todo!() +async fn create_item() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn update_item() -> ApiResult { - todo!() +async fn update_item() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn delete_item() -> ApiResult { - todo!() +async fn delete_item() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn list_transactions() -> ApiResult { - todo!() +async fn list_transactions() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn paypal_webhook() -> ApiResult { - todo!() +async fn paypal_webhook() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } diff --git a/backend/src/api/team.rs b/backend/src/api/team.rs index 0f9a2b0..52ebc06 100644 --- a/backend/src/api/team.rs +++ b/backend/src/api/team.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use axum::{ routing::{delete, get, post, put}, - Router, + Json, Router, }; use crate::models::error::ApiResult; @@ -20,34 +20,34 @@ pub fn router() -> Router> { .route("/roles/{id}", delete(delete_role)) } -async fn list_members() -> ApiResult { - todo!() +async fn list_members() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn invite_member() -> ApiResult { - todo!() +async fn invite_member() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn update_member_role() -> ApiResult { - todo!() +async fn update_member_role() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn remove_member() -> ApiResult { - todo!() +async fn remove_member() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn list_roles() -> ApiResult { - todo!() +async fn list_roles() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn create_role() -> ApiResult { - todo!() +async fn create_role() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn update_role() -> ApiResult { - todo!() +async fn update_role() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn delete_role() -> ApiResult { - todo!() +async fn delete_role() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } diff --git a/backend/src/api/wipes.rs b/backend/src/api/wipes.rs index 8f0982e..f0394ec 100644 --- a/backend/src/api/wipes.rs +++ b/backend/src/api/wipes.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use axum::{ routing::{get, post}, - Router, + Json, Router, }; use crate::models::error::ApiResult; @@ -18,26 +18,26 @@ pub fn router() -> Router> { .route("/history/{id}", get(get_wipe_history_detail)) } -async fn trigger_wipe() -> ApiResult { - todo!() +async fn trigger_wipe() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn dry_run_wipe() -> ApiResult { - todo!() +async fn dry_run_wipe() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn rollback_wipe() -> ApiResult { - todo!() +async fn rollback_wipe() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_wipe_status() -> ApiResult { - todo!() +async fn get_wipe_status() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_wipe_history() -> ApiResult { - todo!() +async fn get_wipe_history() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } -async fn get_wipe_history_detail() -> ApiResult { - todo!() +async fn get_wipe_history_detail() -> ApiResult> { + Ok(Json(serde_json::json!({"status": "not_implemented"}))) } diff --git a/backend/src/middleware/auth.rs b/backend/src/middleware/auth.rs index 9ce9a79..b1f36a6 100644 --- a/backend/src/middleware/auth.rs +++ b/backend/src/middleware/auth.rs @@ -17,7 +17,6 @@ pub struct AuthUser { pub role: Option, } -#[axum::async_trait] impl FromRequestParts> for AuthUser { type Rejection = http::StatusCode; diff --git a/backend/src/middleware/license.rs b/backend/src/middleware/license.rs index 3b05a06..c8fbf8a 100644 --- a/backend/src/middleware/license.rs +++ b/backend/src/middleware/license.rs @@ -19,7 +19,6 @@ pub struct ValidLicense { // - Populate the modules list for downstream permission checks // - Return 403 Forbidden if the license is invalid, expired, or suspended -#[axum::async_trait] impl FromRequestParts for ValidLicense where S: Send + Sync,