From: asonix Date: Mon, 20 Apr 2020 04:47:20 +0000 (-0500) Subject: Allow rustfmt on api config X-Git-Url: http://these/git/readmes/%7B%60%24%7BwebArchiveUrl%7D/save/static/git-favicon.png?a=commitdiff_plain;h=217efdd7067c2fbd2efcb7ab6b76bf9f7345ab99;p=lemmy.git Allow rustfmt on api config --- diff --git a/server/src/routes/api.rs b/server/src/routes/api.rs index 9d5de33c..3ef8ca51 100644 --- a/server/src/routes/api.rs +++ b/server/src/routes/api.rs @@ -7,7 +7,6 @@ use crate::api::user::*; use crate::rate_limit::RateLimit; use actix_web::guard; -#[rustfmt::skip] pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimit) { cfg.service( web::scope("/api/v1") @@ -95,17 +94,35 @@ pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimit) { .route("/mention", web::get().to(route_get::)) .route("/mention", web::put().to(route_post::)) .route("/replies", web::get().to(route_get::)) - .route("/followed_communities", web::get().to(route_get::)) + .route( + "/followed_communities", + web::get().to(route_get::), + ) // Admin action. I don't like that it's in /user .route("/ban", web::post().to(route_post::)) // Account actions. I don't like that they're in /user maybe /accounts .route("/login", web::post().to(route_post::)) - .route("/delete_account", web::post().to(route_post::)) - .route("/password_reset", web::post().to(route_post::)) - .route("/password_change", web::post().to(route_post::)) + .route( + "/delete_account", + web::post().to(route_post::), + ) + .route( + "/password_reset", + web::post().to(route_post::), + ) + .route( + "/password_change", + web::post().to(route_post::), + ) // mark_all_as_read feels off being in this section as well - .route("/mark_all_as_read", web::post().to(route_post::)) - .route("/save_user_settings", web::put().to(route_post::)), + .route( + "/mark_all_as_read", + web::post().to(route_post::), + ) + .route( + "/save_user_settings", + web::put().to(route_post::), + ), ) // Admin Actions .service(