From 217efdd7067c2fbd2efcb7ab6b76bf9f7345ab99 Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 19 Apr 2020 23:47:20 -0500 Subject: [PATCH] Allow rustfmt on api config --- server/src/routes/api.rs | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) 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( -- 2.44.1