feat(API): Add Public API endpoint for updating variables (#15315)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-05-12 16:50:24 +02:00
committed by GitHub
parent 2674d7fe61
commit 52bf9203f0
4 changed files with 82 additions and 31 deletions

View File

@@ -27,6 +27,15 @@ export = {
res.status(201).send();
},
],
updateVariable: [
isLicensed('feat:variables'),
apiKeyHasScopeWithGlobalScopeFallback({ scope: 'variable:update' }),
async (req: VariablesRequest.Update, res: Response) => {
await Container.get(VariablesController).updateVariable(req);
res.status(204).send();
},
],
deleteVariable: [
isLicensed('feat:variables'),
apiKeyHasScopeWithGlobalScopeFallback({ scope: 'variable:delete' }),