mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-28 22:26:44 -06:00
fix: block button in federation panel (#8855)
This commit is contained in:
parent
f995172c5d
commit
3796a3edea
1 changed files with 11 additions and 6 deletions
|
@ -138,12 +138,17 @@ let chartSrc = $ref('instance-requests');
|
||||||
let chartSpan = $ref('hour');
|
let chartSpan = $ref('hour');
|
||||||
|
|
||||||
async function fetch() {
|
async function fetch() {
|
||||||
meta = await os.api('meta', { detail: true });
|
if (iAmModerator) {
|
||||||
|
// 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', {
|
instance = await os.api('federation/show-instance', {
|
||||||
host: props.host,
|
host: props.host,
|
||||||
});
|
});
|
||||||
suspended = instance.isSuspended;
|
suspended = instance.isSuspended;
|
||||||
isBlocked = meta.blockedHosts.includes(instance.host);
|
isBlocked = meta.blockedHosts.includes(instance.host);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function toggleBlock(ev) {
|
async function toggleBlock(ev) {
|
||||||
|
|
Loading…
Reference in a new issue