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:
@@ -26,9 +26,10 @@ export const meta = {
|
||||
}
|
||||
};
|
||||
|
||||
export default define(meta, (ps) => new Promise((res, rej) => {
|
||||
updatePersonById(ps.userId).then(() => res(), e => rej(e));
|
||||
}));
|
||||
export default define(meta, async (ps) => {
|
||||
await updatePersonById(ps.userId);
|
||||
return;
|
||||
});
|
||||
|
||||
async function updatePersonById(userId: mongo.ObjectID) {
|
||||
const user = await getRemoteUser(userId);
|
||||
|
Reference in New Issue
Block a user