forked from jappel/leistungsbilanz-ts
12 lines
459 B
TypeScript
12 lines
459 B
TypeScript
import type { Request, Response } from "express";
|
|
import { circuitListRepository } from "../composition/application-repositories.js";
|
|
|
|
export async function listCircuitListsByProject(req: Request, res: Response) {
|
|
const { projectId } = req.params;
|
|
if (typeof projectId !== "string") {
|
|
return res.status(400).json({ error: "Invalid projectId" });
|
|
}
|
|
|
|
const result = await circuitListRepository.listByProject(projectId);
|
|
return res.json(result);
|
|
}
|