mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
feat(page-editor.el.note): make it retry on throttle
This commit is contained in:
parent
fc47460ae2
commit
b83123003e
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
/* eslint-disable vue/no-mutating-props */
|
/* eslint-disable vue/no-mutating-props */
|
||||||
import { watch, ref } from 'vue';
|
import { watch, ref } from 'vue';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
|
import { retryOnThrottled } from '@@/js/retry-on-throttled.js';
|
||||||
import XContainer from '../page-editor.container.vue';
|
import XContainer from '../page-editor.container.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkSwitch from '@/components/MkSwitch.vue';
|
import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
|
@ -58,7 +59,7 @@ watch(id, async () => {
|
||||||
...props.modelValue,
|
...props.modelValue,
|
||||||
note: id.value,
|
note: id.value,
|
||||||
});
|
});
|
||||||
note.value = await misskeyApi('notes/show', { noteId: id.value });
|
note.value = await retryOnThrottled(() => misskeyApi('notes/show', { noteId: id.value }));
|
||||||
}, {
|
}, {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue