forked from jappel/leistungsbilanz-ts
Rewrite frontend, added rooms, voltage selection per project, startet with todos
This commit is contained in:
parent
81d47ce16f
commit
65819900b1
49 changed files with 3695 additions and 394 deletions
14
src/server/controllers/circuit-list.controller.ts
Normal file
14
src/server/controllers/circuit-list.controller.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import type { Request, Response } from "express";
|
||||
import { CircuitListRepository } from "../../db/repositories/circuit-list.repository.js";
|
||||
|
||||
const circuitListRepository = new CircuitListRepository();
|
||||
|
||||
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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue