feat: Implement create API Token endpoint

This commit is contained in:
Faruk AYDIN
2025-04-08 11:34:45 +02:00
parent 59510dcb0a
commit 540525d6fb
7 changed files with 91 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
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 createApiTokenAction from '../../../../controllers/api/v1/admin/api-tokens/create-api-token.ee.js';
const router = Router();
router.post(
'/',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
createApiTokenAction
);
export default router;