import type { Request, Response } from 'express';
import PolicyAcknowledgmentsService from '@/services/policy_acknowledgments';

export async function list(req: Request, res: Response): Promise<void> {
  const payload = await PolicyAcknowledgmentsService.list(
    req.query,
    req.currentUser,
  );
  res.status(200).send(payload);
}

export async function acknowledge(req: Request, res: Response): Promise<void> {
  const payload = await PolicyAcknowledgmentsService.acknowledge(
    req.body.data,
    req.currentUser,
  );
  res.status(200).send(payload);
}
