refactor: move DB to shared crate, convert push endpoints to server functions, remove dead REST handlers
All checks were successful
Build MIPS Binary / build (push) Successful in 5m17s

This commit is contained in:
spinline
2026-02-10 02:05:04 +03:00
parent c2bf6e6fd5
commit 4b3e713657
14 changed files with 61 additions and 96 deletions

View File

@@ -49,21 +49,3 @@ pub async fn handle_timeout_error(err: BoxError) -> (StatusCode, &'static str) {
)
}
}
#[cfg(feature = "push-notifications")]
pub async fn get_push_public_key_handler(
axum::extract::State(state): axum::extract::State<crate::AppState>,
) -> impl IntoResponse {
let public_key = state.push_store.get_public_key();
(StatusCode::OK, axum::extract::Json(serde_json::json!({ "publicKey": public_key }))).into_response()
}
#[cfg(feature = "push-notifications")]
pub async fn subscribe_push_handler(
axum::extract::State(state): axum::extract::State<crate::AppState>,
axum::extract::Json(subscription): axum::extract::Json<crate::push::PushSubscription>,
) -> impl IntoResponse {
tracing::info!("Received push subscription: {:?}", subscription);
state.push_store.add_subscription(subscription).await;
(StatusCode::OK, "Subscription saved").into_response()
}