Function delete_user_notification

Source
pub async fn delete_user_notification(pool: &Pool<MySql>, id: i64) -> Result<()>
Expand description

Deletes a user notification.

This function permanently removes a user notification record with the specified ID. The operation is performed within a transaction to ensure data consistency.

§Arguments

  • pool - Database connection pool for executing the query
  • id - Unique identifier of the notification to delete

§Returns

  • Ok(()) - Successfully deleted the notification
  • Err(anyhow::Error) - Failed to delete the notification