Compare commits
2 Commits
2d1e117b66
...
2c4e661b9d
Author | SHA1 | Date | |
---|---|---|---|
2c4e661b9d | |||
|
4aea43a8bb |
@ -126,7 +126,7 @@ router.route("/:id/share")
|
|||||||
if (result == null) {
|
if (result == null) {
|
||||||
let item = {
|
let item = {
|
||||||
user_id: req.user._id,
|
user_id: req.user._id,
|
||||||
object_id: new ObjectId(album_id),
|
object_id: album._id,
|
||||||
type: "album",
|
type: "album",
|
||||||
cover: album.covers.cover32
|
cover: album.covers.cover32
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ router.route("/:id/share")
|
|||||||
if (result == null) {
|
if (result == null) {
|
||||||
let item = {
|
let item = {
|
||||||
user_id: req.user._id,
|
user_id: req.user._id,
|
||||||
object_id: new ObjectId(box_id),
|
object_id: box._id,
|
||||||
type: "box",
|
type: "box",
|
||||||
cover: box.covers.cover32
|
cover: box.covers.cover32
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ exports.exists = function (object_id, callback) {
|
|||||||
dbo.collection("shares")
|
dbo.collection("shares")
|
||||||
.findOne({ object_id: ObjectId(object_id) })
|
.findOne({ object_id: ObjectId(object_id) })
|
||||||
.then(result => {
|
.then(result => {
|
||||||
cp(callback, result);
|
cb(callback, result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ exports.add = function (item, callback) {
|
|||||||
])
|
])
|
||||||
.toArray((err, result) => {
|
.toArray((err, result) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
cp(callback, result[0]);
|
cb(callback, result[0]);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user