From 6c44d2eeabedb9e90d10bc10fe4e791988919bf1 Mon Sep 17 00:00:00 2001 From: Shav Kinderlehrer Date: Sat, 6 Apr 2024 09:27:12 -0400 Subject: [PATCH] Edit pages --- src/get.rs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/get.rs b/src/get.rs index d79705e..e5268ff 100644 --- a/src/get.rs +++ b/src/get.rs @@ -11,8 +11,22 @@ use info_utils::prelude::*; use crate::ServerState; use crate::UrlRow; -pub async fn index() -> Html<&'static str> { - Html("hello, world!") +pub async fn index(Extension(state): Extension) -> Html { + Html(format!( + r#" + + + + {} URL Shortener + + + +
{} URL shortener
+ create + + "#, + state.host, state.host + )) } /// # Panics @@ -128,12 +142,12 @@ pub async fn create_id(Extension(state): Extension) -> Html URL to shorten: - +
- +