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:
@@ -63,7 +63,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 = {
|
||||
$and: []
|
||||
} as any;
|
||||
@@ -99,5 +99,5 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => {
|
||||
skip: ps.offset
|
||||
});
|
||||
|
||||
res(await Promise.all(users.map(user => pack(user, me, { detail: true }))));
|
||||
}));
|
||||
return await Promise.all(users.map(user => pack(user, me, { detail: true })));
|
||||
});
|
||||
|
Reference in New Issue
Block a user