Skip to content

Commit

Permalink
feat: allows to print export job queue and cancel job
Browse files Browse the repository at this point in the history
  • Loading branch information
uffy committed May 31, 2024
1 parent f7a2b44 commit 915009a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/next-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ AV.Cloud.define('dailyPushStatsToSlack', () => dailyPushStatsToSlack())
AV.Cloud.define('weeklyPushStatsToSlack', () => weeklyPushStatsToSlack())
AV.Cloud.define('monthlyPushStatsToSlack', () => monthlyPushStatsToSlack())

const { cancelTicketExportJob } = require('../next/api/dist/ticket/export')
AV.Cloud.define('removeExportJob', (req) => {
const { cancelTicketExportJob, getTicketExportJobInfo } = require('../next/api/dist/ticket/export')
AV.Cloud.define('cancelExportJob', (req) => {
if (!req.params.jobId) {
console.error('Cloud Function - removeExportJob: missing jobId')
return
Expand All @@ -51,6 +51,10 @@ AV.Cloud.define('removeExportJob', (req) => {
cancelTicketExportJob(req.params.jobId)
})

AV.Cloud.define('getTicketExportJobInfo', () => {
getTicketExportJobInfo()
})

AV.Cloud.onLogin((request) => {
if (request.object.get('inactive')) {
throw new AV.Cloud.Error(
Expand Down

0 comments on commit 915009a

Please sign in to comment.