mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 21:39:21 +00:00
Add route placeholder
This commit is contained in:
parent
32628af376
commit
45c70cb40e
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
use crate::api_data::movie_api::MovieAPI;
|
use crate::api_data::movie_api::MovieAPI;
|
||||||
use crate::controllers::routes::RequestResult;
|
use crate::controllers::routes::RequestResult;
|
||||||
|
use crate::data::error::ExecError;
|
||||||
use crate::data::http_request_handler::HttpRequestHandler;
|
use crate::data::http_request_handler::HttpRequestHandler;
|
||||||
use crate::helpers::movies_helper;
|
use crate::helpers::movies_helper;
|
||||||
|
|
||||||
@ -12,4 +13,10 @@ pub fn get_list(r: &mut HttpRequestHandler) -> RequestResult {
|
|||||||
let list = movies_helper::get_list_user(r.user_id_ref()?)?;
|
let list = movies_helper::get_list_user(r.user_id_ref()?)?;
|
||||||
|
|
||||||
r.set_response(MovieAPI::for_list(&list))
|
r.set_response(MovieAPI::for_list(&list))
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Remove a movie
|
||||||
|
pub fn delete(r: &mut HttpRequestHandler) -> RequestResult {
|
||||||
|
// TODO : implement method
|
||||||
|
r.internal_error(ExecError::boxed_new("Unimplemented method!"))
|
||||||
}
|
}
|
@ -212,6 +212,8 @@ pub fn get_routes() -> Vec<Route> {
|
|||||||
// Movies controller
|
// Movies controller
|
||||||
Route::post("/movies/get_list", Box::new(movies_controller::get_list)),
|
Route::post("/movies/get_list", Box::new(movies_controller::get_list)),
|
||||||
|
|
||||||
|
Route::post("/movies/delete", Box::new(movies_controller::delete)),
|
||||||
|
|
||||||
|
|
||||||
// Virtual directory controller
|
// Virtual directory controller
|
||||||
Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)),
|
Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)),
|
||||||
|
Loading…
Reference in New Issue
Block a user