Fix bugs
This commit is contained in:
@ -52,15 +52,12 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
|
||||
};
|
||||
}
|
||||
if (type) {
|
||||
query.type = new RegExp(`^${type.replace(/\*/g, '.+?')}$`);
|
||||
query.contentType = new RegExp(`^${type.replace(/\*/g, '.+?')}$`);
|
||||
}
|
||||
|
||||
// Issue query
|
||||
const files = await DriveFile
|
||||
.find(query, {
|
||||
fields: {
|
||||
data: false
|
||||
},
|
||||
limit: limit,
|
||||
sort: sort
|
||||
});
|
||||
|
Reference in New Issue
Block a user