fix(client): moderators cannot view instance-info page

This commit is contained in:
syuilo 2022-06-21 23:22:18 +09:00 committed by Chloe Kudryavtsev
parent 3539a9537e
commit dcf70ebbec

View file

@ -142,12 +142,11 @@ async function fetch() {
// suspended and blocked information is only displayed to moderators.
// otherwise the API will error anyway
meta = await os.api('admin/meta', { detail: true });
instance = await os.api('federation/show-instance', {
host: props.host,
});
suspended = instance.isSuspended;
isBlocked = meta.blockedHosts.includes(instance.host);
isBlocked = instance.isBlocked;
}
}