Commit b08d3fc9 authored by Dennis Willers's avatar Dennis Willers
Browse files

edit response of add and remove point api

parent 00542a98
Loading
Loading
Loading
Loading
+28 −4
Original line number Diff line number Diff line
@@ -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
                                }
                            );
                        }
                    }
                );