v3 adapt v2: port challenges closing and fix create

This commit is contained in:
Matteo Pagliazzi
2016-04-08 18:45:50 +02:00
parent 70fd869934
commit 83fa30fd0a
2 changed files with 47 additions and 97 deletions
+2 -1
View File
@@ -445,7 +445,8 @@ api.updateChallenge = {
// TODO everything here should be moved to a worker
// actually even for a worker it's probably just too big and will kill mongo
async function _closeChal (challenge, broken = {}) {
// Exported because it's used in v2 controller
export async function _closeChal (challenge, broken = {}) {
let winner = broken.winner;
let brokenReason = broken.broken;