rustploy 0.1.3

Rustploy PaaS daemon — lightweight self-hosted deployment platform
1
2
3
4
5
6
7
8
9
10
11
//! `Command::SecretSet`: cria/sobrescreve um secret cifrado do projeto.

use crate::bootstrap::state::AppState;
use shared::Response;

pub async fn handle(state: AppState, project_id: String, name: String, value: String) -> Response {
    match state.secrets.set(&project_id, &name, &value).await {
        Ok(()) => Response::Ok,
        Err(e) => Response::err("SecretSetFailed", e.to_string()),
    }
}