pub async fn get_recent_app_alerts(
pool: &Pool<MySql>,
app_id: i64,
limit: i64,
include_resolved: bool,
) -> Result<Vec<Alert>>Expand description
Retrieves a list of recent alerts for a specific application.
This function fetches alerts associated with an application, typically for display on an application dashboard or status page.
§Arguments
pool- Database connection pool for executing the queryapp_id- ID of the applicationlimit- Maximum number of alerts to retrieveinclude_resolved- Whether to include resolved alerts
§Returns
Ok(Vec<Alert>)- Successfully retrieved list of alertsErr(anyhow::Error)- Failed to fetch alerts