implement JSON export

This commit is contained in:
Alex Holliday committed 2025-11-21 10:43:29 -08:00
1 parent fec32380ae
commit 58e7ef2527
7 files changed
+176

No files matched your search

@@ -442,6 +442,24 @@ class MonitorController extends BaseController {
"exportMonitorsToCSV"
);
exportMonitorsToJSON = this.asyncHandler(
async (req, res) => {
const teamId = req?.user?.teamId;
if (!teamId) {
throw this.errorService.createBadRequestError("Team ID is required");
}
const json = await this.monitorService.exportMonitorsToJSON({ teamId });
return res.success({
msg: "OK",
data: json,
});
},
SERVICE_NAME,
"exportMonitorsToJSON"
);
getAllGames = this.asyncHandler(
async (req, res) => {
return res.success({