mairie360_api_lib 0.4.0

Lib for mairie360 APIs
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::redis::simple_key::secure_get_key;

pub async fn handle_secure_get(
    mut conn: deadpool_redis::Connection,
    key: &str,
) -> Result<String, anyhow::Error> {
    match secure_get_key(&mut conn, key).await {
        Ok(value) => Ok(value),
        Err(e) => Err(anyhow::anyhow!(format!("{}", e))),
    }
}