Your ROOT_URL in app.ini is https://git.ondrovo.com/ but you are visiting http://159.69.29.240:49153/MightyPork/group-actor/commit/e1ac2777f3d466f6ee3a067bade404eb0e74d2a6?style=unified&whitespace=show-all
You should set ROOT_URL correctly, otherwise the web may not work correctly.
1 changed files with
4 additions and
4 deletions
src/utils.rs
@ -19,8 +19,8 @@ impl<V, E: Error> LogError for Result<V, E> {
}
}
pub ( crate ) fn acct_to_server ( acct : & str ) -> Option < & str > {
acct . trim_start_matches ( '@' ) . split ( '@' ) . nth ( 1 )
pub ( crate ) fn acct_to_server ( acct : & str ) -> Option < String > {
acct . trim_start_matches ( '@' ) . split ( '@' ) . nth ( 1 ) . map ( | s | s . to_lowercase ( ) )
}
pub ( crate ) fn normalize_acct ( acct : & str , group : & str ) -> Result < String , GroupError > {
@ -45,8 +45,8 @@ mod test {
#[ test ]
fn test_acct_to_server ( ) {
assert_eq! ( Some ( "novak" ) , acct_to_server ( "pepa@novak" ) ) ;
assert_eq! ( Some ( "banana.co.uk" ) , acct_to_server ( "@pepa@banana.co.uk" ) ) ;
assert_eq! ( Some ( "novak" . to_string ( ) ) , acct_to_server ( "pepa@novak" ) ) ;
assert_eq! ( Some ( "banana.co.uk" . to_string ( ) ) , acct_to_server ( "@pepa@banana.co.uk" ) ) ;
assert_eq! ( None , acct_to_server ( "probably_local" ) ) ;
}