Adding some return statements to make the JS control flow the same as the Python
This commit is contained in:
parent
4ada3515a2
commit
d58a0baa03
@ -48,6 +48,7 @@ app.get("/counters/:counterName", (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
res.status(404).send(error_response)
|
res.status(404).send(error_response)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
data_response = {
|
data_response = {
|
||||||
@ -66,6 +67,7 @@ app.post("/counters/:counterName/increment", (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
res.status(404).send(error_response)
|
res.status(404).send(error_response)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
data_response = {
|
data_response = {
|
||||||
@ -87,6 +89,7 @@ app.post("/counters/:counterName/decrement", (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
res.status(404).send(error_response)
|
res.status(404).send(error_response)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
data_response = {
|
data_response = {
|
||||||
|
Loading…
Reference in New Issue
Block a user