[Fix] Stability
This commit is contained in:
parent
5d5dabcdb0
commit
8082050170
20 changed files with 563 additions and 464 deletions
|
|
@ -1,13 +1,34 @@
|
|||
use http::StatusCode;
|
||||
use mtp::webserver::Http3Response;
|
||||
use mtp::webserver::HttpResponse;
|
||||
|
||||
pub fn index_handler(response: Http3Response) -> Http3Response {
|
||||
pub fn index_handler(response: HttpResponse) -> HttpResponse {
|
||||
let documentation = r#"
|
||||
Omega API Server
|
||||
|
||||
Available Routes:
|
||||
- /api/* : API endpoints for the Omega server.
|
||||
- /direct/* : Resolution for shortened links.
|
||||
- /api/get/omikron
|
||||
Returns a randomly selected connected Omikron.
|
||||
- /api/get/omikron/{id}
|
||||
Returns an Omikron by ID. If {id} is a connected Iota ID or user ID,
|
||||
returns that account's primary connected Omikron instead.
|
||||
- /api/get/connections
|
||||
Returns the current live connection map as
|
||||
{ "status": "success", "connections": { omikron_id: { iota_id: [user_id] } } }.
|
||||
- /api/get/iota/{id}
|
||||
Returns the Iota's public identity data.
|
||||
- /api/get/user/{id}
|
||||
Returns user profile and public identity data.
|
||||
- /api/get/id/{username}
|
||||
Resolves a username to its user and Iota IDs.
|
||||
- /api/get/public_key
|
||||
Returns Omega's public key.
|
||||
- /api/download/iota_frontend
|
||||
Downloads the Iota frontend archive.
|
||||
- /direct/{short_key}
|
||||
Resolves a shortened link with a temporary redirect.
|
||||
|
||||
All IDs must be positive decimal integers. The connections endpoint reports
|
||||
live in-memory state; it is empty after an Omega restart until Omikrons sync.
|
||||
|
||||
All other routes will return this documentation.
|
||||
"#;
|
||||
|
|
|
|||
Loading…
Reference in a new issue