implement JSON export
This commit is contained in:
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({
|
||||
|
||||
Reference in new issue
Block a user