Compare commits

...

2 Commits

Author SHA1 Message Date
abb2ac6c12 Edit test APIv0 endpoint 2024-03-22 15:09:42 +05:00
56f6326833 Change main html 2024-03-22 14:46:45 +05:00
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ type DBPool = Arc<Pool<ConnectionMgrTcp>>;
pub async fn api(req: Request<Incoming>, pool: DBPool) -> Json {
let uri: &str = req.uri().path().as_ref();
match &uri[7..uri.len()] {
"/test" => json!({"error": false, "msg": "test endpoint v0"}),
"/test" => json!({"error": false, "msg": "test"}),
"/auth" => auth(req, pool.clone()).await,
"/auth_get" => auth_get(req, pool.clone()).await,
_ => json!({"error": true, "msg": "No endpoint"})

View File

@ -22,7 +22,7 @@ pub const FOOTER_HTML: &str = r#"
</html>
"#;
pub const INDEX_HTML: &str = "<h1>main</h1>";
pub const INDEX_HTML: &str = "<h1>IN WORK!!!</h1>";
pub const LOGIN_HTML: &str = r#"
<h1>login</h1>