From: Felix Date: Thu, 16 Jan 2020 15:47:38 +0000 (+0100) Subject: fix formatting X-Git-Url: http://these/git/%22https:/image.com/%7BcanonicalUrl%7D?a=commitdiff_plain;h=2c5529254462ebd02232a0d1d0128d3fd6bca3eb;p=lemmy.git fix formatting --- diff --git a/server/src/routes/api.rs b/server/src/routes/api.rs index 70e68688..b7fb773f 100644 --- a/server/src/routes/api.rs +++ b/server/src/routes/api.rs @@ -12,164 +12,48 @@ use serde::Serialize; type DbParam = web::Data>>; +#[rustfmt::skip] pub fn config(cfg: &mut web::ServiceConfig) { cfg - .route( - "/api/v1/login", - web::post().to(route::), - ) - .route( - "/api/v1/register", - web::post().to(route::), - ) - .route( - "/api/v1/create_community", - web::post().to(route::), - ) - .route( - "/api/v1/create_post", - web::post().to(route::), - ) - .route( - "/api/v1/list_communities", - web::get().to(route::), - ) - .route( - "/api/v1/list_categories", - web::get().to(route::), - ) - .route( - "/api/v1/get_post", - web::get().to(route::), - ) - .route( - "/api/v1/get_community", - web::get().to(route::), - ) - .route( - "/api/v1/create_communent", - web::post().to(route::), - ) - .route( - "/api/v1/edit_comment", - web::post().to(route::), - ) - .route( - "/api/v1/save_comment", - web::post().to(route::), - ) - .route( - "/api/v1/create_comment_like", - web::post().to(route::), - ) - .route( - "/api/v1/get_posts", - web::get().to(route::), - ) - .route( - "/api/v1/create_post_like", - web::post().to(route::), - ) - .route( - "/api/v1/edit_post", - web::post().to(route::), - ) - .route( - "/api/v1/save_post", - web::post().to(route::), - ) - .route( - "/api/v1/edit_community", - web::post().to(route::), - ) - .route( - "/api/v1/follow_community", - web::post().to(route::), - ) - .route( - "/api/v1/get_followed_communities", - web::get().to(route::), - ) - .route( - "/api/v1/get_user_details", - web::get().to(route::), - ) - .route( - "/api/v1/get_replies", - web::get().to(route::), - ) - .route( - "/api/v1/get_user_mentions", - web::get().to(route::), - ) - .route( - "/api/v1/edit_user_mention", - web::post().to(route::), - ) - .route( - "/api/v1/get_modlog", - web::get().to(route::), - ) - .route( - "/api/v1/ban_from_community", - web::post().to(route::), - ) - .route( - "/api/v1/add_mod_to_community", - web::post().to(route::), - ) - .route( - "/api/v1/create_site", - web::post().to(route::), - ) - .route( - "/api/v1/edit_site", - web::post().to(route::), - ) - .route( - "/api/v1/get_site", - web::get().to(route::), - ) - .route( - "/api/v1/add_admin", - web::post().to(route::), - ) - .route( - "/api/v1/ban_user", - web::post().to(route::), - ) - .route( - "/api/v1/search", - web::post().to(route::), - ) - .route( - "/api/v1/mark_all_as_read", - web::post().to(route::), - ) - .route( - "/api/v1/save_user_settings", - web::post().to(route::), - ) - .route( - "/api/v1/transfer_community", - web::post().to(route::), - ) - .route( - "/api/v1/transfer_site", - web::post().to(route::), - ) - .route( - "/api/v1/delete_account", - web::post().to(route::), - ) - .route( - "/api/v1/password_reset", - web::post().to(route::), - ) - .route( - "/api/v1/password_change", - web::post().to(route::), - ); + .route("/api/v1/login", web::post().to(route::)) + .route("/api/v1/register", web::post().to(route::)) + .route("/api/v1/create_community", web::post().to(route::)) + .route("/api/v1/create_post", web::post().to(route::)) + .route("/api/v1/list_communities", web::get().to(route::)) + .route("/api/v1/list_categories", web::get().to(route::)) + .route("/api/v1/get_post", web::get().to(route::)) + .route("/api/v1/get_community", web::get().to(route::)) + .route("/api/v1/create_communent", web::post().to(route::)) + .route("/api/v1/edit_comment", web::post().to(route::)) + .route("/api/v1/save_comment", web::post().to(route::)) + .route("/api/v1/create_comment_like", web::post().to(route::)) + .route("/api/v1/get_posts", web::get().to(route::)) + .route("/api/v1/create_post_like", web::post().to(route::)) + .route("/api/v1/edit_post", web::post().to(route::)) + .route("/api/v1/save_post", web::post().to(route::)) + .route("/api/v1/edit_community", web::post().to(route::)) + .route("/api/v1/follow_community", web::post().to(route::)) + .route("/api/v1/get_followed_communities", web::get().to(route::)) + .route("/api/v1/get_user_details", web::get().to(route::)) + .route("/api/v1/get_replies", web::get().to(route::)) + .route("/api/v1/get_user_mentions", web::get().to(route::)) + .route("/api/v1/edit_user_mention", web::post().to(route::)) + .route("/api/v1/get_modlog", web::get().to(route::)) + .route("/api/v1/ban_from_community", web::post().to(route::)) + .route("/api/v1/add_mod_to_community", web::post().to(route::)) + .route("/api/v1/create_site", web::post().to(route::)) + .route("/api/v1/edit_site", web::post().to(route::)) + .route("/api/v1/get_site", web::get().to(route::)) + .route("/api/v1/add_admin", web::post().to(route::)) + .route("/api/v1/ban_user", web::post().to(route::)) + .route("/api/v1/search", web::post().to(route::)) + .route("/api/v1/mark_all_as_read", web::post().to(route::)) + .route("/api/v1/save_user_settings", web::post().to(route::)) + .route("/api/v1/transfer_community", web::post().to(route::)) + .route("/api/v1/transfer_site", web::post().to(route::)) + .route("/api/v1/delete_account", web::post().to(route::)) + .route("/api/v1/password_reset", web::post().to(route::)) + .route("/api/v1/password_change", web::post().to(route::)); } fn perform(data: Request, db: DbParam) -> Result