From b63380b251d04dd92f06aa5bbc22a72ca3e4bf8e Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Thu, 24 Jul 2025 22:32:27 -0400 Subject: wip: 83B78D40-D7CB-4419-9FE7-E7D858909443 --- src/push/handlers/unregister.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/push/handlers/unregister.rs (limited to 'src/push/handlers/unregister.rs') diff --git a/src/push/handlers/unregister.rs b/src/push/handlers/unregister.rs new file mode 100644 index 0000000..a00ee92 --- /dev/null +++ b/src/push/handlers/unregister.rs @@ -0,0 +1,16 @@ +use axum::{ + extract::{Path, State}, + http::StatusCode, +}; + +use crate::{app::App, error::Internal, push::Id, token::extract::Identity}; + +pub async fn handler( + State(app): State, + identity: Identity, + Path(subscription): Path, +) -> Result { + app.push().unregister(&identity.user, &subscription).await?; + + Ok(StatusCode::NO_CONTENT) +} -- cgit v1.2.3