awa-ui 0.6.1

Web UI and JSON API for the Awa job queue
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use axum::extract::State;
use axum::Json;

use awa_model::admin;

use crate::error::ApiError;
use crate::state::AppState;

pub async fn list_kinds(
    State(state): State<AppState>,
) -> Result<Json<Vec<admin::JobKindOverview>>, ApiError> {
    let kinds = admin::job_kind_overviews(&state.pool).await?;
    Ok(Json(kinds))
}