From dd2fa43fe007dc8b33c693065f64f00d2c638e20 Mon Sep 17 00:00:00 2001 From: Danila Eremin Date: Sat, 15 Oct 2016 19:55:54 +0300 Subject: [PATCH] add exams contest --- dbContest.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dbContest.js b/dbContest.js index a5ed108..a9cab5b 100644 --- a/dbContest.js +++ b/dbContest.js @@ -22,6 +22,9 @@ module.exports = function (Contest) { }, removeContestById : function (contestId) { return dbUtils.dbRemoveItem(Contest, {_id: contestId}); + }, + setExam : function (contestId, exam) { + return dbUtils.dbFindOneAndUpdate(Contest,{_id : contestId},{ 'meta.exam' : exam}); } }; }; -- GitLab