Improve error handling of API (#4345)
* wip
* wip
* wip
* Update attached_notes.ts
* wip
* Refactor
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update call.ts
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* ✌️
* Fix
This commit is contained in:
@ -46,7 +46,7 @@ const sort: any = { // < https://github.com/Microsoft/TypeScript/issues/1863
|
||||
[fallback]: { _id: -1 }
|
||||
};
|
||||
|
||||
export default define(meta, (ps, me) => new Promise(async (res, rej) => {
|
||||
export default define(meta, async (ps, me) => {
|
||||
const q = {
|
||||
'metadata.deletedAt': { $exists: false },
|
||||
} as any;
|
||||
@ -61,5 +61,5 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => {
|
||||
skip: ps.offset
|
||||
});
|
||||
|
||||
res(await packMany(files, { detail: true, withUser: true, self: true }));
|
||||
}));
|
||||
return await packMany(files, { detail: true, withUser: true, self: true });
|
||||
});
|
||||
|
Reference in New Issue
Block a user