summaryrefslogtreecommitdiff
path: root/packages/client/src/os.ts
diff options
context:
space:
mode:
authorJohann150 <johann.galle@protonmail.com>2022-05-26 15:53:09 +0200
committerGitHub <noreply@github.com>2022-05-26 22:53:09 +0900
commit3dae18b93cc2a219087c4e1a8acc763ff064b71d (patch)
treeee00206569ab940f7e1af154452123567c4d92f8 /packages/client/src/os.ts
parentuse http-signature module that supports hs2019 (#8635) (diff)
downloadmisskey-3dae18b93cc2a219087c4e1a8acc763ff064b71d.tar.gz
misskey-3dae18b93cc2a219087c4e1a8acc763ff064b71d.tar.bz2
misskey-3dae18b93cc2a219087c4e1a8acc763ff064b71d.zip
fix lints (#8737)
* fix: emits use ev instead of e * fix: errors use err instead of e * fix: replace use of data where possible * fix: events use evt instead of e * fix: use strict equals * fix: use emoji instead of e * fix: vue lints
Diffstat (limited to 'packages/client/src/os.ts')
-rw-r--r--packages/client/src/os.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/client/src/os.ts b/packages/client/src/os.ts
index 06a8ff99dc..6baf538917 100644
--- a/packages/client/src/os.ts
+++ b/packages/client/src/os.ts
@@ -59,10 +59,10 @@ export const apiWithDialog = ((
token?: string | null | undefined,
) => {
const promise = api(endpoint, data, token);
- promiseDialog(promise, null, (e) => {
+ promiseDialog(promise, null, (err) => {
alert({
type: 'error',
- text: e.message + '\n' + (e as any).id,
+ text: err.message + '\n' + (err as any).id,
});
});
@@ -72,7 +72,7 @@ export const apiWithDialog = ((
export function promiseDialog<T extends Promise<any>>(
promise: T,
onSuccess?: ((res: any) => void) | null,
- onFailure?: ((e: Error) => void) | null,
+ onFailure?: ((err: Error) => void) | null,
text?: string,
): T {
const showing = ref(true);
@@ -88,14 +88,14 @@ export function promiseDialog<T extends Promise<any>>(
showing.value = false;
}, 1000);
}
- }).catch(e => {
+ }).catch(err => {
showing.value = false;
if (onFailure) {
- onFailure(e);
+ onFailure(err);
} else {
alert({
type: 'error',
- text: e
+ text: err,
});
}
});