//! `Command::JobList`: jobs (Schedules) de um projeto.
use crate::bootstrap::state::AppState;
use shared::Response as RpResponse;
pub async fn handle(state: AppState, project_id: String) -> RpResponse {
match crate::store::job::list(&state.db, &project_id).await {
Ok(jobs) => RpResponse::Jobs(jobs),
Err(e) => RpResponse::err("DatabaseError", e.to_string()),
}
}