mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-09-25 14:19:45 +00:00
Start to create report route
This commit is contained in:
@@ -20,4 +20,5 @@ pub mod web_app_controller;
|
||||
pub mod calls_controller;
|
||||
pub mod user_ws_actions;
|
||||
pub mod push_notifications_controller;
|
||||
pub mod forez_controller;
|
||||
pub mod report_controller;
|
||||
pub mod forez_controller;
|
||||
|
15
src/controllers/report_controller.rs
Normal file
15
src/controllers/report_controller.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use crate::data::base_request_handler::BaseRequestHandler;
|
||||
use crate::data::config::conf;
|
||||
use crate::data::http_request_handler::HttpRequestHandler;
|
||||
use crate::routes::RequestResult;
|
||||
|
||||
/// Submit a new report
|
||||
pub async fn report(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
if !conf().allow_reporting {
|
||||
r.bad_request("Reporting is disabled!".to_string())?;
|
||||
}
|
||||
|
||||
// TODO : continue
|
||||
|
||||
r.success("go on")
|
||||
}
|
Reference in New Issue
Block a user