fix(client): 非モデレーターがインスタンス情報ページを表示できない問題を修正

This commit is contained in:
syuilo 2022-06-28 22:56:18 +09:00 committed by Johann150
parent 435e45351c
commit 6513e72a3e
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -134,16 +134,11 @@ let suspended = $ref(false);
let isBlocked = $ref(false); let isBlocked = $ref(false);
async function fetch() { async function fetch() {
if (iAmModerator) { instance = await os.api('federation/show-instance', {
// suspended and blocked information is only displayed to moderators. host: props.host,
// otherwise the API will error anyway });
suspended = instance.isSuspended;
instance = await os.api('federation/show-instance', { isBlocked = instance.isBlocked;
host: props.host,
});
suspended = instance.isSuspended;
isBlocked = instance.isBlocked;
}
} }
async function toggleBlock(ev) { async function toggleBlock(ev) {