mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-01-06 10:58:50 +00:00
18 lines
573 B
Rust
18 lines
573 B
Rust
use crate::api_data::server_config::ServerConfig;
|
|
use crate::data::base_request_handler::BaseRequestHandler;
|
|
use crate::data::http_request_handler::HttpRequestHandler;
|
|
use crate::routes::RequestResult;
|
|
|
|
/// Main server controller
|
|
///
|
|
/// @author Pierre Hubert
|
|
|
|
/// Root server index
|
|
pub fn main_index(request: &mut HttpRequestHandler) -> RequestResult {
|
|
request.success("Comunic API server V3. (c) Pierre Hubert 2020")
|
|
}
|
|
|
|
/// Get server configuration
|
|
pub fn get_config(request: &mut HttpRequestHandler) -> RequestResult {
|
|
request.set_response(ServerConfig::new())
|
|
} |