1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-01-07 19:32:34 +00:00
comunicapiv3/src/controllers/server_controller.rs

18 lines
573 B
Rust
Raw Normal View History

2021-02-15 16:03:25 +00:00
use crate::api_data::server_config::ServerConfig;
2021-02-05 08:11:30 +00:00
use crate::data::base_request_handler::BaseRequestHandler;
use crate::data::http_request_handler::HttpRequestHandler;
2021-02-13 15:15:25 +00:00
use crate::routes::RequestResult;
2020-05-21 13:28:07 +00:00
/// Main server controller
///
/// @author Pierre Hubert
/// Root server index
2021-02-05 08:11:30 +00:00
pub fn main_index(request: &mut HttpRequestHandler) -> RequestResult {
2020-05-21 13:28:07 +00:00
request.success("Comunic API server V3. (c) Pierre Hubert 2020")
2021-02-15 16:03:25 +00:00
}
/// Get server configuration
pub fn get_config(request: &mut HttpRequestHandler) -> RequestResult {
request.set_response(ServerConfig::new())
2020-05-21 13:28:07 +00:00
}