enhance: アカウント削除時のクライアントの挙動をいい感じにするなど (#10002)
* refreshAccounts Resolve #9322 * アカウント管理画面でリストを更新するように * Update packages/frontend/src/account.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * ✌️ * クライアント起動時は現在ログインしているアカウントのみリフレッシュする * clean up * なんかめっちゃ変えた * refactor * refactor * fix lint --------- Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
This commit is contained in:
parent
a4ca127ebd
commit
c75afad64a
7 changed files with 149 additions and 94 deletions
|
@ -75,7 +75,7 @@ export class ApiCallService implements OnApplicationShutdown {
|
|||
}
|
||||
this.send(reply, res);
|
||||
}).catch((err: ApiError) => {
|
||||
this.send(reply, err.httpStatusCode ? err.httpStatusCode : err.kind === 'client' ? 400 : 500, err);
|
||||
this.send(reply, err.httpStatusCode ? err.httpStatusCode : err.kind === 'client' ? 400 : err.kind === 'permission' ? 403 : 500, err);
|
||||
});
|
||||
|
||||
if (user) {
|
||||
|
@ -129,7 +129,7 @@ export class ApiCallService implements OnApplicationShutdown {
|
|||
}, request).then((res) => {
|
||||
this.send(reply, res);
|
||||
}).catch((err: ApiError) => {
|
||||
this.send(reply, err.httpStatusCode ? err.httpStatusCode : err.kind === 'client' ? 400 : 500, err);
|
||||
this.send(reply, err.httpStatusCode ? err.httpStatusCode : err.kind === 'client' ? 400 : err.kind === 'permission' ? 403 : 500, err);
|
||||
});
|
||||
|
||||
if (user) {
|
||||
|
@ -321,7 +321,7 @@ export class ApiCallService implements OnApplicationShutdown {
|
|||
|
||||
// API invoking
|
||||
return await ep.exec(data, user, token, file, request.ip, request.headers).catch((err: Error) => {
|
||||
if (err instanceof ApiError) {
|
||||
if (err instanceof ApiError || err instanceof AuthenticationError) {
|
||||
throw err;
|
||||
} else {
|
||||
const errId = uuid();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue