feat: secure genrate key endpoint

This commit is contained in:
2026-05-07 20:59:01 +02:00
parent 7b98fab2c8
commit 3ace9c48ae
+1 -1
View File
@@ -27,7 +27,7 @@ pub fn protected_router() -> Router<AppState> {
.route(
"/keys/generate",
post(apikey::create_api_key).route_layer(middleware::from_fn(|req, next| {
require_roles(req, next, None, None)
require_roles(req, next, None, Some("admin"))
})),
)
}