Add dummy worker result return endpoint

This commit is contained in:
rubenwardy 2017-01-19 16:11:27 +00:00
parent bcd15e1046
commit a8b592bec7

View File

@ -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