REST-endpoints and readme

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-01 13:09:44 +01:00
parent 2e8ef6739c
commit 97e06e3726
7 changed files with 588 additions and 30 deletions

View File

@@ -10,12 +10,14 @@ function frontpage_lists(msg, socket) {
});
}
function update_frontpage(coll, id, title) {
function update_frontpage(coll, id, title, callback) {
db.collection("frontpage_lists").update({_id: coll}, {$set: {
id: id,
title: title,
accessed: Functions.get_time()}
},{upsert: true}, function(err, returnDocs){});
},{upsert: true}, function(err, returnDocs){
if(typeof(callback) == "function") callback();
});
}
module.exports.frontpage_lists = frontpage_lists;