Compare commits
2 Commits
9183bcae28
...
abb2ac6c12
| Author | SHA1 | Date | |
|---|---|---|---|
| abb2ac6c12 | |||
| 56f6326833 |
@ -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"})
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user