mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
core - fix metadata searching
This commit is contained in:
parent
02429277ff
commit
c8c5be3d7a
@ -81,9 +81,7 @@ export default (
|
||||
// Check if there is a file with the same hash
|
||||
const much = await DriveFile.findOne({
|
||||
md5: hash,
|
||||
metadata: {
|
||||
user_id: user._id
|
||||
}
|
||||
'metadata.user_id': user._id
|
||||
});
|
||||
|
||||
if (much !== null) {
|
||||
@ -97,7 +95,7 @@ export default (
|
||||
// Calculate drive usage
|
||||
const usage = ((await DriveFile
|
||||
.aggregate([
|
||||
{ $match: { metadata: { user_id: user._id } } },
|
||||
{ $match: { 'metadata.user_id': user._id } },
|
||||
{ $project: {
|
||||
length: true
|
||||
}},
|
||||
|
Loading…
Reference in New Issue
Block a user