Commit 5072db53 authored by 不如归去's avatar 不如归去 Committed by GitHub

change order: null is a normal username.

parent 44964db2
...@@ -161,14 +161,14 @@ router.post('/score', function (req, res) { ...@@ -161,14 +161,14 @@ router.post('/score', function (req, res) {
let end = req.body.end let end = req.body.end
let arena = req.body.arena || 'entertain' let arena = req.body.arena || 'entertain'
if (!usernameA || !usernameB) {
return res.status(404).send('username can not be null')
}
if (userscoreA == -5 && userscoreB == -5) { if (userscoreA == -5 && userscoreB == -5) {
return res.status(200).send('ghost match wont calculate the score.'); return res.status(200).send('ghost match wont calculate the score.');
} }
if (!usernameA || !usernameB) {
return res.status(404).send('username can not be null')
}
pool.connect(function (err, client, done) { pool.connect(function (err, client, done) {
if (err) { if (err) {
console.error('error fetching client from pool', err); console.error('error fetching client from pool', err);
......
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