Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Tabu-Middleware
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dennis Willers
Tabu-Middleware
Commits
b08d3fc9
Commit
b08d3fc9
authored
Dec 29, 2020
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit response of add and remove point api
parent
00542a98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
4 deletions
+28
-4
events.js
events.js
+28
-4
No files found.
events.js
View file @
b08d3fc9
...
@@ -237,7 +237,13 @@ function createRouter(db) {
...
@@ -237,7 +237,13 @@ function createRouter(db) {
console
.
log
(
error
);
console
.
log
(
error
);
res
.
status
(
500
).
json
({
status
:
'
false
'
});
res
.
status
(
500
).
json
({
status
:
'
false
'
});
}
else
{
}
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) {
...
@@ -249,7 +255,13 @@ function createRouter(db) {
console
.
log
(
error
);
console
.
log
(
error
);
res
.
status
(
500
).
json
({
status
:
'
false
'
});
res
.
status
(
500
).
json
({
status
:
'
false
'
});
}
else
{
}
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) {
...
@@ -273,7 +285,13 @@ function createRouter(db) {
console
.
log
(
error
);
console
.
log
(
error
);
res
.
status
(
500
).
json
({
status
:
'
false
'
});
res
.
status
(
500
).
json
({
status
:
'
false
'
});
}
else
{
}
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) {
...
@@ -285,7 +303,13 @@ function createRouter(db) {
console
.
log
(
error
);
console
.
log
(
error
);
res
.
status
(
500
).
json
({
status
:
'
false
'
});
res
.
status
(
500
).
json
({
status
:
'
false
'
});
}
else
{
}
else
{
res
.
status
(
200
).
json
({
status
:
'
true
'
});
res
.
status
(
200
).
json
(
{
status
:
'
true
'
,
red
:
req
.
body
.
red
,
blue
:
JSON
.
parse
(
req
.
body
.
blue
)
-
1
}
);
}
}
}
}
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment