Function get_recent_app_alerts

Source
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 query
  • app_id - ID of the application
  • limit - Maximum number of alerts to retrieve
  • include_resolved - Whether to include resolved alerts

§Returns

  • Ok(Vec<Alert>) - Successfully retrieved list of alerts
  • Err(anyhow::Error) - Failed to fetch alerts