proper index.html

This commit is contained in:
Skye 2023-08-15 22:10:16 +09:00
parent 6f3f3d943d
commit 956ec10e83
Signed by: me
GPG key ID: 0104BC05F41B77B8
2 changed files with 19 additions and 3 deletions

16
src/index.html Normal file
View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<title>e4vc</title>
</head>
<body>
I was too lazy to make a fancy e4mc-esque site so this is what you get<br>
Put <code>https://e4vc.fly.dev/</code> in Vencord -> Cloud -> Backend URL to use
</body>
</html>

View file

@ -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(