feat: Implement get previous steps rest API endpoint

This commit is contained in:
Faruk AYDIN
2024-03-21 14:40:18 +01:00
parent 4dbc7fdc7d
commit 6da7fe158f
5 changed files with 253 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import asyncHandler from 'express-async-handler';
import { authenticateUser } from '../../../helpers/authentication.js';
import { authorizeUser } from '../../../helpers/authorization.js';
import getConnectionAction from '../../../controllers/api/v1/steps/get-connection.js';
import getPreviousStepsAction from '../../../controllers/api/v1/steps/get-previous-steps.js';
const router = Router();
@@ -13,4 +14,11 @@ router.get(
asyncHandler(getConnectionAction)
);
router.get(
'/:stepId/previous-steps',
authenticateUser,
authorizeUser,
asyncHandler(getPreviousStepsAction)
);
export default router;