[Add] Omega Index route
This commit is contained in:
parent
ee3cceb26b
commit
c41860509a
3 changed files with 20 additions and 1 deletions
17
src/server/index.rs
Normal file
17
src/server/index.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use actix_web::{HttpResponse, Responder};
|
||||
|
||||
pub async fn index_handler() -> impl Responder {
|
||||
let documentation = r#"
|
||||
Omega API Server
|
||||
|
||||
Available Routes:
|
||||
- /api/* : API endpoints for the Omega server.
|
||||
- /direct/* : Resolution for shortened links.
|
||||
|
||||
All other routes will return this documentation.
|
||||
"#;
|
||||
|
||||
HttpResponse::Ok()
|
||||
.content_type("text/plain; charset=utf-8")
|
||||
.body(documentation)
|
||||
}
|
||||
Loading…
Reference in a new issue