11 lines
377 B
TypeScript
11 lines
377 B
TypeScript
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);
|
|
}
|