add setVariants function

parent 5499fd91
...@@ -28,6 +28,9 @@ module.exports = function (Contest) { ...@@ -28,6 +28,9 @@ module.exports = function (Contest) {
}, },
setHidden : function (contestId, hidden) { setHidden : function (contestId, hidden) {
return dbUtils.dbFindOneAndUpdate(Contest,{_id : contestId},{ 'meta.hidden' : hidden}); return dbUtils.dbFindOneAndUpdate(Contest,{_id : contestId},{ 'meta.hidden' : hidden});
},
setVariants: function (contestId, variants) {
return dbUtils.dbFindOneAndUpdate(Contest,{_id : contestId},{ 'meta.variants' : variants});
} }
}; };
}; };
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