feat: Implement admin update template API endpoint

This commit is contained in:
Faruk AYDIN
2025-02-28 16:26:48 +01:00
parent f3ba8517c9
commit 1cb380a077
4 changed files with 124 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import { checkIsEnterprise } from '../../../../helpers/check-is-enterprise.js';
import createTemplateAction from '../../../../controllers/api/v1/admin/templates/create-template.ee.js';
import getTemplatesAction from '../../../../controllers/api/v1/admin/templates/get-templates.ee.js';
import updateTemplateAction from '../../../../controllers/api/v1/admin/templates/update-template.ee.js';
const router = Router();
@@ -24,4 +25,12 @@ router.post(
createTemplateAction
);
router.patch(
'/:templateId',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
updateTemplateAction
);
export default router;