import { Router } from 'express';
import { VaultController } from '../controllers/VaultController';
import { requireTraceContext } from '../../core/guards/trace-context.guard';

const router = Router();

/**
 * [CORE_SEC_01] 凭证保险库路由
 * 强制要求 Trace 上下文
 */
router.use(requireTraceContext);

router.post('/', VaultController.save);
router.get('/', VaultController.list);
router.get('/:id/decrypt', VaultController.decrypt);

export default router;
