Make lints pass

This commit is contained in:
Andras Schmelczer 2024-12-18 21:54:58 +00:00
parent da0e5f7373
commit 0c92bf959b
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
10 changed files with 30 additions and 20 deletions

View file

@ -8,9 +8,9 @@ use aide::{
};
use anyhow::{Context, Result};
use axum::{
extract::{DefaultBodyLimit, WebSocketUpgrade},
extract::DefaultBodyLimit,
http::{self, HeaderValue, Method},
response::{IntoResponse, Response},
response::IntoResponse,
Extension, Json,
};
use log::info;
@ -63,7 +63,6 @@ pub async fn create_server(app_state: AppState) -> Result<()> {
"/vaults/:vault_id/documents/:document_id",
delete(delete_document::delete_document),
)
.api_route("/ws", get(handler))
.route("/", Scalar::new("/api.json").axum_route())
.route("/api.json", axum::routing::get(serve_api))
.layer(DefaultBodyLimit::max(
@ -96,11 +95,4 @@ pub async fn create_server(app_state: AppState) -> Result<()> {
.context("Failed to start server")
}
async fn handler(ws: WebSocketUpgrade) -> Response {
ws.protocols(["graphql-ws", "graphql-transport-ws"])
.on_upgrade(|socket| async {
// ...
})
}
async fn serve_api(Extension(api): Extension<OpenApi>) -> impl IntoResponse { Json(api) }