add work with course and contest meta

parent 10f2cdda
......@@ -31,6 +31,9 @@ module.exports = function (Contest) {
},
setVariants: function (contestId, variants) {
return dbUtils.dbFindOneAndUpdate(Contest,{_id : contestId},{ 'meta.variants' : variants});
},
updateContestMeta : function (contestId, meta) {
return dbUtils.dbFindOneAndUpdate(Contest, {_id: contestId}, {meta : meta});
}
};
};
......@@ -46,6 +46,9 @@ module.exports = function (Course) {
},
deleteGroup : function (courseId, groupId) {
return dbUtils.dbFindOneAndUpdate(Course, {_id : courseId}, {$pull : {groups : groupId}});
},
updateCourseMeta : function (courseId, meta) {
return dbUtils.dbFindOneAndUpdate(Course, {_id: courseId}, {meta : meta});
}
};
};
......
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