Add API for propagating cursor locations #61

Merged
schmelczer merged 30 commits from asch/show-cursors into main 2025-06-08 20:20:53 +01:00
3 changed files with 18 additions and 0 deletions
Showing only changes of commit 86e158c7c5 - Show all commits

Add homepage

Andras Schmelczer 2025-06-08 14:45:24 +01:00
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -6,6 +6,7 @@ mod fetch_document_version;
mod fetch_document_version_content; mod fetch_document_version_content;
mod fetch_latest_document_version; mod fetch_latest_document_version;
mod fetch_latest_documents; mod fetch_latest_documents;
mod index;
mod ping; mod ping;
mod requests; mod requests;
mod responses; mod responses;
@ -54,6 +55,7 @@ pub async fn create_server(config_path: Option<OsString>) -> Result<()> {
let app = Router::new() let app = Router::new()
.nest("/", get_authed_routes(app_state.clone())) .nest("/", get_authed_routes(app_state.clone()))
.route("/", get(index::index))
.route("/vaults/:vault_id/ping", get(ping::ping)) .route("/vaults/:vault_id/ping", get(ping::ping))
.route("/vaults/:vault_id/ws", get(websocket::websocket_handler)) .route("/vaults/:vault_id/ws", get(websocket::websocket_handler))
.layer(DefaultBodyLimit::disable()) .layer(DefaultBodyLimit::disable())

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>VaultLink</title>
</head>
<body>
<h1>VaultLink server</h1>
</body>
</html>

View file

@ -0,0 +1,7 @@
use axum::response::{Html, IntoResponse};
pub async fn index() -> impl IntoResponse {
const HTML_CONTENT: &str = include_str!("./assets/index.html");
let html_content = HTML_CONTENT;
Html(html_content)
}