about summary refs log tree commit diff
path: root/kittybox-rs/src/frontend
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2022-10-02 11:54:30 +0300
committerVika <vika@fireburn.ru>2022-10-02 11:54:30 +0300
commit568f98589b6c30bb3f807517d28039b12dd54be3 (patch)
tree885f918885b246d3760cf3b1f2a252b88485f358 /kittybox-rs/src/frontend
parentb7d4e5c4686bc8aac41d832567190002542a1743 (diff)
downloadkittybox-568f98589b6c30bb3f807517d28039b12dd54be3.tar.zst
companion-lite: rewrite to use IndieAuth
This is a naive implementation that doesn't have some security
checks. It's ok tho, should work fine... can refine it later
Diffstat (limited to 'kittybox-rs/src/frontend')
-rw-r--r--kittybox-rs/src/frontend/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/kittybox-rs/src/frontend/mod.rs b/kittybox-rs/src/frontend/mod.rs
index 6b4bdae..970a09b 100644
--- a/kittybox-rs/src/frontend/mod.rs
+++ b/kittybox-rs/src/frontend/mod.rs
@@ -280,7 +280,9 @@ const ONBOARDING_CSS: &[u8] = include_bytes!("./onboarding.css");
 const INDIEAUTH_JS: &[u8] = include_bytes!(concat!(
     env!("OUT_DIR"), "/", "kittybox_js", "/", "indieauth.js"
 ));
-
+const LIB_JS: &[u8] = include_bytes!(concat!(
+    env!("OUT_DIR"), "/", "kittybox_js", "/", "lib.js"
+));
 const MIME_JS: &str = "application/javascript";
 const MIME_CSS: &str = "text/css";
 const MIME_PLAIN: &str = "text/plain";
@@ -293,6 +295,7 @@ pub async fn statics(Path(name): Path<String>) -> impl IntoResponse {
         "onboarding.js" => (StatusCode::OK, [(CONTENT_TYPE, MIME_JS)], ONBOARDING_JS),
         "onboarding.css" => (StatusCode::OK, [(CONTENT_TYPE, MIME_CSS)], ONBOARDING_CSS),
         "indieauth.js" => (StatusCode::OK, [(CONTENT_TYPE, MIME_JS)], INDIEAUTH_JS),
+        "lib.js" => (StatusCode::OK, [(CONTENT_TYPE, MIME_JS)], LIB_JS),
         _ => (
             StatusCode::NOT_FOUND,
             [(CONTENT_TYPE, MIME_PLAIN)],