proper index.html

hrt
Skye 1 year ago
parent 6f3f3d943d
commit 956ec10e83
Signed by: me
GPG Key ID: 0104BC05F41B77B8

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

@ -5,8 +5,8 @@ use axum::{
async_trait, async_trait,
extract::{FromRef, FromRequestParts, Query, State, DefaultBodyLimit}, extract::{FromRef, FromRequestParts, Query, State, DefaultBodyLimit},
http::{header::AUTHORIZATION, request::Parts, HeaderValue, StatusCode}, http::{header::AUTHORIZATION, request::Parts, HeaderValue, StatusCode},
response::{IntoResponse, Response}, response::{IntoResponse, Response, Html},
routing::{delete, get, post}, routing::{delete, get},
Json, Router, Json, Router,
}; };
use base64::{engine::general_purpose as base64_engines, Engine}; use base64::{engine::general_purpose as base64_engines, Engine};
@ -211,7 +211,7 @@ async fn main() -> anyhow::Result<()> {
let client = reqwest::Client::new(); let client = reqwest::Client::new();
let app = Router::new() let app = Router::new()
.route("/", post(|| async { "Hello!" })) .route("/", get(|| async { Html(include_str!("index.html")) }))
.route( .route(
"/v1", "/v1",
get(|| async { Json(json!({ "ping": "pong" })) }).layer( get(|| async { Json(json!({ "ping": "pong" })) }).layer(

Loading…
Cancel
Save