Fix constant name
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build is passing

This commit is contained in:
Pierre HUBERT 2024-04-23 18:53:44 +02:00
parent 8fc03d43bc
commit f28f9dbc5a
3 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ impl TokenRights {
return Some("All API rights shall start with /api/");
}
if r.path.len() > constants::API_TOKEN_PATH_MAX_LENGTH {
if r.path.len() > constants::API_TOKEN_RIGHT_PATH_MAX_LENGTH {
return Some("An API path shall not exceed maximum URL size!");
}
}

View File

@ -106,4 +106,4 @@ pub const API_TOKEN_DESCRIPTION_MIN_LENGTH: usize = 5;
pub const API_TOKEN_DESCRIPTION_MAX_LENGTH: usize = 30;
/// API token right path max length
pub const API_TOKEN_PATH_MAX_LENGTH: usize = 255;
pub const API_TOKEN_RIGHT_PATH_MAX_LENGTH: usize = 255;

View File

@ -114,7 +114,7 @@ pub async fn static_config(local_auth: LocalAuthEnabled) -> impl Responder {
api_token_right_path_size: LenConstraints {
min: 0,
max: constants::API_TOKEN_PATH_MAX_LENGTH,
max: constants::API_TOKEN_RIGHT_PATH_MAX_LENGTH,
},
},
})