pub async fn delete_read_user_notifications(
pool: &Pool<MySql>,
user_id: i64,
) -> Result<i64>
Expand description
Deletes all read notifications for a user.
This function permanently removes all notifications that have been marked as read for a specific user. This can be used as a “clear all” feature to help users maintain a clean notification list.
§Arguments
pool
- Database connection pool for executing the queryuser_id
- ID of the user whose read notifications should be deleted
§Returns
Ok(i64)
- Number of notifications deletedErr(anyhow::Error)
- Failed to delete notifications