Add base server
This commit is contained in:
17
geneit_backend/src/controllers/config_controller.rs
Normal file
17
geneit_backend/src/controllers/config_controller.rs
Normal file
@ -0,0 +1,17 @@
|
||||
use crate::constants::StaticConstraints;
|
||||
use actix_web::{HttpResponse, Responder};
|
||||
|
||||
/// Default hello route
|
||||
pub async fn home() -> impl Responder {
|
||||
HttpResponse::Ok().json("GeneIT API service.")
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, Default)]
|
||||
struct StaticConfig {
|
||||
constraints: StaticConstraints,
|
||||
}
|
||||
|
||||
/// Get static configuration
|
||||
pub async fn static_config() -> impl Responder {
|
||||
HttpResponse::Ok().json(StaticConfig::default())
|
||||
}
|
Reference in New Issue
Block a user