From 956ec10e83c91ed3a2f715927a81448a2643eea0 Mon Sep 17 00:00:00 2001 From: Skye Date: Tue, 15 Aug 2023 22:10:16 +0900 Subject: [PATCH] proper index.html --- src/index.html | 16 ++++++++++++++++ src/main.rs | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 src/index.html diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..2932594 --- /dev/null +++ b/src/index.html @@ -0,0 +1,16 @@ + + + + + + + e4vc + + + I was too lazy to make a fancy e4mc-esque site so this is what you get
+ Put https://e4vc.fly.dev/ in Vencord -> Cloud -> Backend URL to use + + \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 11edf5b..fe8b959 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,8 +5,8 @@ use axum::{ async_trait, extract::{FromRef, FromRequestParts, Query, State, DefaultBodyLimit}, http::{header::AUTHORIZATION, request::Parts, HeaderValue, StatusCode}, - response::{IntoResponse, Response}, - routing::{delete, get, post}, + response::{IntoResponse, Response, Html}, + routing::{delete, get}, Json, Router, }; use base64::{engine::general_purpose as base64_engines, Engine}; @@ -211,7 +211,7 @@ async fn main() -> anyhow::Result<()> { let client = reqwest::Client::new(); let app = Router::new() - .route("/", post(|| async { "Hello!" })) + .route("/", get(|| async { Html(include_str!("index.html")) })) .route( "/v1", get(|| async { Json(json!({ "ping": "pong" })) }).layer(