add cover to shared items
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Artem Anufrij
2023-02-17 22:06:11 +01:00
parent 1c8163c835
commit 8f000ff110
5 changed files with 13 additions and 11 deletions

View File

@@ -15,7 +15,6 @@ let box_project = {
"videos.box_id": false,
"videos.mime": false,
path: false,
"covers.cover32": false,
}
}
let boxes_project = {

View File

@@ -45,6 +45,7 @@ exports.byId = function (id, callback) {
exports.collection = function (callback) {
dbo.collection("shares")
.find({})
.sort({ type: 1 })
.toArray((err, result) => {
if (err) throw err;
cb(callback, result);
@@ -55,7 +56,7 @@ exports.exists = function (object_id, callback) {
dbo.collection("shares")
.findOne({ object_id: ObjectId(object_id) })
.then(result => {
callback(result);
cp(callback, result);
});
}
@@ -74,7 +75,7 @@ exports.add = function (item, callback) {
])
.toArray((err, result) => {
if (err) throw err;
callback(result[0]);
cp(callback, result[0]);
})
}
});