diff options
Diffstat (limited to 'crates/shirabe/src/util')
| -rw-r--r-- | crates/shirabe/src/util/auth_helper.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/shirabe/src/util/auth_helper.rs b/crates/shirabe/src/util/auth_helper.rs index 0b1620d..f386b1e 100644 --- a/crates/shirabe/src/util/auth_helper.rs +++ b/crates/shirabe/src/util/auth_helper.rs @@ -534,14 +534,14 @@ impl AuthHelper { true, ) && in_array( PhpMixed::String(origin.to_string()), - &PhpMixed::List( - self.config - .borrow_mut() - .get("gitlab-domains") - .as_array() - .map(|a| a.values().map(|v| v.clone()).collect()) - .unwrap_or_default(), - ), + &PhpMixed::List({ + let gitlab_domains = self.config.borrow_mut().get("gitlab-domains"); + match &gitlab_domains { + PhpMixed::List(l) => l.clone(), + PhpMixed::Array(a) => a.values().cloned().collect(), + _ => vec![], + } + }), true, ) { if password == "oauth2" { |
