Files
proxy/nodejs/models/cert.js
T
2026-02-25 22:21:16 -05:00

27 lines
478 B
JavaScript

'use strict';
const {createClient} = require('redis');
const client = createClient({});
client.connect();
async function getCert(host){
try{
console.log('looking for', host);
return JSON.parse(await client.GET(`${host}:latest`));
}catch(error){
return {}
}
}
async function deleteCert(host){
try{
console.log('looking for', host);
return JSON.parse(await client.DEL(`${host}:latest`));
}catch(error){
return {}
}
}
module.exports = {getCert, deleteCert};