mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-23 05:49:22 +00:00
Ready to implement new route
This commit is contained in:
parent
697a01b6df
commit
bc8fdb13f1
@ -260,3 +260,8 @@ pub fn update_content(r: &mut HttpRequestHandler) -> RequestResult {
|
|||||||
|
|
||||||
r.success("Content updated")
|
r.success("Content updated")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Delete a post
|
||||||
|
pub fn delete(r: &mut HttpRequestHandler) -> RequestResult {
|
||||||
|
r.success("Implement me")
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
|
|
||||||
use crate::controllers::{account_controller, conversations_controller, friends_controller, groups_controller, search_controller, server_controller, user_controller, virtual_directory_controller, posts_controller, movies_controller};
|
use crate::controllers::{account_controller, conversations_controller, friends_controller, groups_controller, movies_controller, posts_controller, search_controller, server_controller, user_controller, virtual_directory_controller};
|
||||||
use crate::controllers::routes::Method::{GET, POST};
|
use crate::controllers::routes::Method::{GET, POST};
|
||||||
use crate::data::http_request_handler::HttpRequestHandler;
|
use crate::data::http_request_handler::HttpRequestHandler;
|
||||||
|
|
||||||
@ -212,6 +212,8 @@ pub fn get_routes() -> Vec<Route> {
|
|||||||
|
|
||||||
Route::post("/posts/update_content", Box::new(posts_controller::update_content)),
|
Route::post("/posts/update_content", Box::new(posts_controller::update_content)),
|
||||||
|
|
||||||
|
Route::post("/posts/delete", Box::new(posts_controller::delete)),
|
||||||
|
|
||||||
|
|
||||||
// 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)),
|
||||||
|
Loading…
Reference in New Issue
Block a user