← history for src/handlers.rs
35bda350src/handlers.rs17 lines⬡ raw↓ download
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
/**
 * Config Vault - cfgvault
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Paolo Lulli <kevwe.com>
 * @copyright Paolo Lulli 2026
 */

use crate::vault;
use actix_web::{HttpRequest, Responder};

pub(crate) async fn vault_handler(req: HttpRequest) -> impl Responder {
    let param_p = req.match_info().get("key").unwrap_or("no-value");
    vault::retrieve_entry(param_p).unwrap_or_default()
}