More intermediary work

This commit is contained in:
Kasper Rynning-Tønnesen
2019-10-08 15:52:55 +02:00
parent c6382c0af1
commit cb712d9555
23 changed files with 1299 additions and 706 deletions

View File

@@ -2,8 +2,8 @@ var path = require("path");
var mongojs = require("mongojs");
var db = require(pathThumbnails + "/handlers/db.js");
function update(collection, searchObject, updateObject, extraObject) {
return new Promise((resolve, reject) => {
async function update(collection, searchObject, updateObject, extraObject) {
return new Promise(async (resolve, reject) => {
db.collection(collection).update(
searchObject,
updateObject,
@@ -19,4 +19,4 @@ function update(collection, searchObject, updateObject, extraObject) {
});
}
module.exports.update = update;
module.exports = update;