Give more appropriate name to define authorized route for API token
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Pierre HUBERT 2024-04-09 21:53:11 +02:00
parent fd3df3d214
commit 631cc96537

View File

@ -21,7 +21,7 @@ impl TokenID {
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
pub struct TokenRight {
verb: TokenVerb,
uri: String,
path: String,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
@ -108,7 +108,7 @@ pub struct NewToken {
impl TokenRights {
pub fn check_error(&self) -> Option<&'static str> {
for r in &self.0 {
if !r.uri.starts_with("/api/") {
if !r.path.starts_with("/api/") {
return Some("All API rights shall start with /api/");
}
}