diff --git a/src/rabbitmq/jobqueue.ts b/src/rabbitmq/jobqueue.ts index 48ffd69..5ab9497 100644 --- a/src/rabbitmq/jobqueue.ts +++ b/src/rabbitmq/jobqueue.ts @@ -55,7 +55,7 @@ amqp.connect(`amqp://${config.AMQP.USER}:${config.AMQP.PASS}@${config.AMQP.HOST} * @returns {boolean} true if job was put on queue successfully */ function queueJob(job: JudgeJob) { - return jobChannel.sendToQueue(jobQ, new Buffer(JSON.stringify(job)), {persistent: true}) + return jobChannel.sendToQueue(jobQ, Buffer.from(JSON.stringify(job)), {persistent: true}) } export { queueJob, diff --git a/src/routes/api/run.ts b/src/routes/api/run.ts index bcd3ec1..804f590 100644 --- a/src/routes/api/run.ts +++ b/src/routes/api/run.ts @@ -24,7 +24,7 @@ export interface RunResponse { const runPool: {[x: number]: Response} = {} /** - * @api {post} /run POST /run + * @api {post} /runs POST /runs * @apiDescription Run a code and get its output * @apiName PostRun * @apiGroup Run