pub async fn delete_notification<J, RR, TR, NR, NFR, SR, TCR, PR>(
notification_id: String,
state: ThinDataAppState<J, RR, TR, NR, NFR, SR, TCR, PR>,
) -> Result<HttpResponse, ApiError>where
J: JobProducerTrait + Send + Sync + 'static,
RR: RelayerRepository + Repository<RelayerRepoModel, String> + Send + Sync + 'static,
TR: TransactionRepository + Repository<TransactionRepoModel, String> + Send + Sync + 'static,
NR: NetworkRepository + Repository<NetworkRepoModel, String> + Send + Sync + 'static,
NFR: Repository<NotificationRepoModel, String> + Send + Sync + 'static,
SR: Repository<SignerRepoModel, String> + Send + Sync + 'static,
TCR: TransactionCounterTrait + Send + Sync + 'static,
PR: PluginRepositoryTrait + Send + Sync + 'static,
Expand description
Deletes a notification by ID.
§Arguments
notification_id
- The ID of the notification to delete.state
- The application state containing the notification repository.
§Returns
A success response or an error if deletion fails.
§Security
This endpoint ensures that notifications cannot be deleted if they are still being used by any relayers. This prevents breaking existing relayer configurations and maintains system integrity.