Allow rustfmt on api config

This commit is contained in:
asonix 2020-04-19 23:47:20 -05:00
parent 4712ae4eb0
commit 217efdd706

View file

@ -7,7 +7,6 @@ use crate::api::user::*;
use crate::rate_limit::RateLimit; use crate::rate_limit::RateLimit;
use actix_web::guard; use actix_web::guard;
#[rustfmt::skip]
pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimit) { pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimit) {
cfg.service( cfg.service(
web::scope("/api/v1") 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::<GetUserMentions>)) .route("/mention", web::get().to(route_get::<GetUserMentions>))
.route("/mention", web::put().to(route_post::<EditUserMention>)) .route("/mention", web::put().to(route_post::<EditUserMention>))
.route("/replies", web::get().to(route_get::<GetReplies>)) .route("/replies", web::get().to(route_get::<GetReplies>))
.route("/followed_communities", web::get().to(route_get::<GetFollowedCommunities>)) .route(
"/followed_communities",
web::get().to(route_get::<GetFollowedCommunities>),
)
// Admin action. I don't like that it's in /user // Admin action. I don't like that it's in /user
.route("/ban", web::post().to(route_post::<BanUser>)) .route("/ban", web::post().to(route_post::<BanUser>))
// Account actions. I don't like that they're in /user maybe /accounts // Account actions. I don't like that they're in /user maybe /accounts
.route("/login", web::post().to(route_post::<Login>)) .route("/login", web::post().to(route_post::<Login>))
.route("/delete_account", web::post().to(route_post::<DeleteAccount>)) .route(
.route("/password_reset", web::post().to(route_post::<PasswordReset>)) "/delete_account",
.route("/password_change", web::post().to(route_post::<PasswordChange>)) web::post().to(route_post::<DeleteAccount>),
)
.route(
"/password_reset",
web::post().to(route_post::<PasswordReset>),
)
.route(
"/password_change",
web::post().to(route_post::<PasswordChange>),
)
// mark_all_as_read feels off being in this section as well // mark_all_as_read feels off being in this section as well
.route("/mark_all_as_read", web::post().to(route_post::<MarkAllAsRead>)) .route(
.route("/save_user_settings", web::put().to(route_post::<SaveUserSettings>)), "/mark_all_as_read",
web::post().to(route_post::<MarkAllAsRead>),
)
.route(
"/save_user_settings",
web::put().to(route_post::<SaveUserSettings>),
),
) )
// Admin Actions // Admin Actions
.service( .service(