projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix challenge creation (TODO: decide a challenge structure)
[vchess.git]
/
routes
/
challenge.js
diff --git
a/routes/challenge.js
b/routes/challenge.js
index
2131870
..
8d99621
100644
(file)
--- a/
routes/challenge.js
+++ b/
routes/challenge.js
@@
-18,7
+18,7
@@
router.post("/challenges/:vid([0-9]+)", access.logged, access.ajax, (req,res) =>
};
const error = checkChallenge(chall);
ChallengeModel.create(chall, (err,lastId) => {
- res.json(err || {c
hallenge: Object.assign(chall, {id: lastId["rowid"]})
});
+ res.json(err || {c
id: lastId["rowid"]
});
});
});