about summary refs log tree commit diff
path: root/src/indieauth.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/indieauth.rs')
-rw-r--r--src/indieauth.rs25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/indieauth.rs b/src/indieauth.rs
index aea7e4d..f8f862b 100644
--- a/src/indieauth.rs
+++ b/src/indieauth.rs
@@ -166,14 +166,23 @@ where
                     .build())
             }
             Some(value) => {
-                match (&req.state().internal_token) {
-                    Some(token) => if token == &value.last().to_string().split(" ").skip(1).collect::<String>() {
-                        req.set_ext::<User>(User::new(
-                            "", // no user ID here
-                            "https://kittybox.fireburn.ru/",
-                            "update delete undelete media kittybox_internal:do_what_thou_wilt"
-                        ));
-                        return Ok(next.run(req).await)
+                match &req.state().internal_token {
+                    Some(token) => {
+                        if token
+                            == &value
+                                .last()
+                                .to_string()
+                                .split(' ')
+                                .skip(1)
+                                .collect::<String>()
+                        {
+                            req.set_ext::<User>(User::new(
+                                "", // no user ID here
+                                "https://kittybox.fireburn.ru/",
+                                "update delete undelete media kittybox_internal:do_what_thou_wilt",
+                            ));
+                            return Ok(next.run(req).await);
+                        }
                     }
                     None => {}
                 }