From a8b592bec7ddcfc234249757bce973cf9c8fc722 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Thu, 19 Jan 2017 16:11:27 +0000 Subject: [PATCH] Add dummy worker result return endpoint --- webapp/controllers/workerapi.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webapp/controllers/workerapi.js b/webapp/controllers/workerapi.js index 34f0868..3a5df16 100644 --- a/webapp/controllers/workerapi.js +++ b/webapp/controllers/workerapi.js @@ -3,7 +3,7 @@ const express = require("express") const router = express.Router() -router.get("/get-work", function(req, res) { +router.get("/job", function(req, res) { var worker_token = req.query.token var db = req.app.get("db") db.Worker.findOne({ @@ -44,4 +44,9 @@ router.get("/get-work", function(req, res) { }) }) +router.post("/job", function(req, res) { + console.log(req.body) + res.send("OK") +}) + module.exports = router