Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions packages/junior-dashboard/src/mock-reporting/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ import {
personalSpendReportSchema,
personParamsSchema,
pluginOperationalReportFeedSchema,
reviewItemCountSchema,
reviewItemListSchema,
reviewItemWaitingConversationsSchema,
automationExecutionListSchema,
automationListSchema,
automationParamsSchema,
Expand Down Expand Up @@ -294,6 +297,23 @@ export function createMockReportingApi(): Hono<{
}
return errorResponse("Attachment not found.", 404);
});
// Mock reporting has no Review items. Answer the reads here so the
// dashboard does not query a database that has no review item tables.
app.get("/review-items", () =>
jsonResponse(reviewItemListSchema, { items: [] }),
);
app.get("/review-items/count", () =>
jsonResponse(reviewItemCountSchema, { mine: 0 }),
);
app.get("/review-items/waiting-conversations", () =>
jsonResponse(reviewItemWaitingConversationsSchema, { conversationIds: [] }),
);
app.get("/review-items/:id", () =>
errorResponse("Review item not found.", 404),
);
app.post("/review-items/:id/actions", () =>
errorResponse("Review item not found.", 404),
);
app.get("/automations", (c) => {
const report = readMockAutomationList();
return jsonResponse(
Expand Down
Loading