[API] Fix bugs
This commit is contained in:
parent
3fa905dee2
commit
46e85e5cc3
7 changed files with 21 additions and 11 deletions
|
|
@ -33,13 +33,17 @@ export default (
|
|||
_file = await DriveFile.findOne({
|
||||
_id: file
|
||||
}, {
|
||||
data: false
|
||||
fields: {
|
||||
data: false
|
||||
}
|
||||
});
|
||||
} else if (typeof file === 'string') {
|
||||
_file = await DriveFile.findOne({
|
||||
_id: new mongo.ObjectID(file)
|
||||
}, {
|
||||
data: false
|
||||
fields: {
|
||||
data: false
|
||||
}
|
||||
});
|
||||
} else {
|
||||
_file = deepcopy(file);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue