Commit b08d3fc9 authored by Dennis Willers's avatar Dennis Willers 🏀

edit response of add and remove point api

parent 00542a98
......@@ -237,7 +237,13 @@ function createRouter(db) {
console.log(error);
res.status(500).json({status: 'false'});
} else {
res.status(200).json({status: 'true'});
res.status(200).json(
{
status: 'true',
red: JSON.parse(req.body.red)+1,
blue: req.body.blue
}
);
}
}
);
......@@ -249,7 +255,13 @@ function createRouter(db) {
console.log(error);
res.status(500).json({status: 'false'});
} else {
res.status(200).json({status: 'true'});
res.status(200).json(
{
status: 'true',
red: req.body.red,
blue: JSON.parse(req.body.blue)+1
}
);
}
}
);
......@@ -273,7 +285,13 @@ function createRouter(db) {
console.log(error);
res.status(500).json({status: 'false'});
} else {
res.status(200).json({status: 'true'});
res.status(200).json(
{
status: 'true',
red: JSON.parse(req.body.red)-1,
blue: req.body.blue
}
);
}
}
);
......@@ -285,7 +303,13 @@ function createRouter(db) {
console.log(error);
res.status(500).json({status: 'false'});
} else {
res.status(200).json({status: 'true'});
res.status(200).json(
{
status: 'true',
red: req.body.red,
blue: JSON.parse(req.body.blue)-1
}
);
}
}
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment