rustploy 0.1.2

Rustploy PaaS daemon — lightweight self-hosted deployment platform
1
2
3
4
5
6
7
8
9
10
11
//! `Command::ProjectList`: todos os projetos.

use crate::api::AppState;
use shared::Response as RpResponse;

pub async fn handle(state: AppState) -> RpResponse {
    match crate::db::projects::list(&state.db).await {
        Ok(ps) => RpResponse::Projects(ps),
        Err(e) => RpResponse::err("DatabaseError", e.to_string()),
    }
}