Skip to content

Commit 314b871

Browse files
authored
Merge pull request #543 from AmbireTech/sentry-accounting-last-approved-axum
changed spender route to use ServiceBuilder
2 parents 4b8a2ca + 6256829 commit 314b871

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sentry/src/routes/routers.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ pub fn channels_router_axum<C: Locked + 'static>() -> Router {
141141
get(get_spender_limits_axum::<C>).post(add_spender_leaf_axum::<C>),
142142
)
143143
.route("/all", get(get_all_spender_limits_axum::<C>))
144-
.layer(middleware::from_fn(authentication_required::<C, _>));
144+
.layer(
145+
// keeps the order from top to bottom!
146+
ServiceBuilder::new().layer(middleware::from_fn(authentication_required::<C, _>)),
147+
);
145148

146149
let channel_routes = Router::new()
147150
.route(

0 commit comments

Comments
 (0)