diff options
author | Alex <lx@deuxfleurs.fr> | 2025-01-29 20:42:56 +0000 |
---|---|---|
committer | Alex <lx@deuxfleurs.fr> | 2025-01-29 20:42:56 +0000 |
commit | 6ed78abb5cd09f4e5ca5effe5d6137faf33133f8 (patch) | |
tree | c33690f411436ef2022f847447027fbcf2feb41a /src/api/admin/router_v1.rs | |
parent | 5560a963e048f6bb000fc37b7e7ad73dbe96f3ab (diff) | |
parent | 19454c1679352012f1953949d02880e34820039f (diff) | |
download | garage-6ed78abb5cd09f4e5ca5effe5d6137faf33133f8.tar.gz garage-6ed78abb5cd09f4e5ca5effe5d6137faf33133f8.zip |
Merge pull request 'admin API refactoring (step 1)' (#939) from refactor-admin into next-v2
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/939
Diffstat (limited to 'src/api/admin/router_v1.rs')
-rw-r--r-- | src/api/admin/router_v1.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/api/admin/router_v1.rs b/src/api/admin/router_v1.rs index cc5ff2ec..7e738145 100644 --- a/src/api/admin/router_v1.rs +++ b/src/api/admin/router_v1.rs @@ -6,12 +6,6 @@ use crate::admin::error::*; use crate::admin::router_v0; use crate::router_macros::*; -pub enum Authorization { - None, - MetricsToken, - AdminToken, -} - router_match! {@func /// List of all Admin API endpoints. @@ -210,15 +204,6 @@ impl Endpoint { ))), } } - /// Get the kind of authorization which is required to perform the operation. - pub fn authorization_type(&self) -> Authorization { - match self { - Self::Health => Authorization::None, - Self::CheckDomain => Authorization::None, - Self::Metrics => Authorization::MetricsToken, - _ => Authorization::AdminToken, - } - } } generateQueryParameters! { |