From 63d536f4053fb0a62e82bf99f04437db7e8a54b4 Mon Sep 17 00:00:00 2001 From: Abhishek Gupta Date: Sun, 6 Jan 2019 14:38:48 +0530 Subject: [PATCH 1/2] docs: typo in run endpoint --- src/routes/api/run.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 45877f4ff429292e459d723641bd62e6499bd9fe Mon Sep 17 00:00:00 2001 From: Abhishek Gupta Date: Sun, 6 Jan 2019 14:39:05 +0530 Subject: [PATCH 2/2] use Buffer.from() instead of new Buffer() --- src/rabbitmq/jobqueue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,