import type { Request, Response } from 'express';
import { paramStr } from '@/api/http/request';
import ContentCatalogService from '@/services/content_catalog';

export async function findByType(req: Request, res: Response): Promise<void> {
  const payload = await ContentCatalogService.findByType(
    paramStr(req.params.contentType),
  );
  res.status(200).send(payload);
}
