Fix bugs
This commit is contained in:
parent
6e091261d3
commit
253747ecfb
3 changed files with 4 additions and 5 deletions
|
|
@ -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
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue