Save a list of safe to export secret keys

This commit is contained in:
Cohee
2024-02-23 21:41:54 +02:00
parent bc2010a762
commit cb536a7611
3 changed files with 23 additions and 12 deletions

View File

@ -124,6 +124,11 @@ export async function readSecretState() {
}
}
/**
* Finds a secret value by key.
* @param {string} key Secret key
* @returns {Promise<string | undefined>} Secret value, or undefined if keys are not exposed
*/
export async function findSecret(key) {
try {
const response = await fetch('/api/secrets/find', {