test: Implement tests for create template API endpoint

This commit is contained in:
Faruk AYDIN
2025-02-26 16:55:29 +01:00
parent 72436f7d3b
commit 3cfa174628
5 changed files with 175 additions and 5 deletions

View File

@@ -1,11 +1,18 @@
import { Router } from 'express';
import { authenticateUser } from '../../../../helpers/authentication.js';
import { authorizeAdmin } from '../../../../helpers/authorization.js';
import { checkIsEnterprise } from '../../../../helpers/check-is-enterprise.js';
import createTemplateAction from '../../../../controllers/api/v1/admin/templates/create-template.ee.js';
const router = Router();
router.post('/', authenticateUser, authorizeAdmin, createTemplateAction);
router.post(
'/',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
createTemplateAction
);
export default router;