import type { Request, Response } from 'express';
import SafetyQuizResultsService from '@/services/safety_quiz_results';

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

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