mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 10:30:37 +09:00
Clarify missing companyId error for malformed issues path
This commit is contained in:
parent
f49a003bd9
commit
5aecb148a2
2 changed files with 56 additions and 0 deletions
|
|
@ -43,6 +43,13 @@ export function companyRoutes(db: Db) {
|
|||
res.json(filtered);
|
||||
});
|
||||
|
||||
// Common malformed path when companyId is empty in "/api/companies/{companyId}/issues".
|
||||
router.get("/issues", (_req, res) => {
|
||||
res.status(400).json({
|
||||
error: "Missing companyId in path. Use /api/companies/{companyId}/issues.",
|
||||
});
|
||||
});
|
||||
|
||||
router.get("/:companyId", async (req, res) => {
|
||||
assertBoard(req);
|
||||
const companyId = req.params.companyId as string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue