fix meta fetch

This commit is contained in:
Namekuji 2023-04-30 17:06:43 -04:00
parent c89bed41b0
commit d8e139a21f
No known key found for this signature in database
GPG Key ID: B541BD6E646CABC7
1 changed files with 4 additions and 7 deletions

View File

@ -337,7 +337,7 @@
import { watch } from "vue"; import { watch } from "vue";
import { Virtual } from "swiper"; import { Virtual } from "swiper";
import { Swiper, SwiperSlide } from "swiper/vue"; import { Swiper, SwiperSlide } from "swiper/vue";
import type * as misskey from "calckey-js"; import type * as calckey from "calckey-js";
import MkChart from "@/components/MkChart.vue"; import MkChart from "@/components/MkChart.vue";
import MkObjectView from "@/components/MkObjectView.vue"; import MkObjectView from "@/components/MkObjectView.vue";
import FormLink from "@/components/form/link.vue"; import FormLink from "@/components/form/link.vue";
@ -360,11 +360,11 @@ import "swiper/scss";
import "swiper/scss/virtual"; import "swiper/scss/virtual";
import { getProxiedImageUrlNullable } from "@/scripts/media-proxy"; import { getProxiedImageUrlNullable } from "@/scripts/media-proxy";
type AugmentedInstanceMetadata = misskey.entities.DetailedInstanceMetadata & { type AugmentedInstanceMetadata = calckey.entities.DetailedInstanceMetadata & {
blockedHosts: string[]; blockedHosts: string[];
silencedHosts: string[]; silencedHosts: string[];
}; };
type AugmentedInstance = misskey.entities.Instance & { type AugmentedInstance = calckey.entities.Instance & {
isBlocked: boolean; isBlocked: boolean;
isSilenced: boolean; isSilenced: boolean;
}; };
@ -397,11 +397,8 @@ const usersPagination = {
offsetMode: true, offsetMode: true,
}; };
async function init() {
meta = (await os.api("admin/meta")) as AugmentedInstanceMetadata;
}
async function fetch() { async function fetch() {
meta = (await os.api("admin/meta")) as AugmentedInstanceMetadata;
instance = (await os.api("federation/show-instance", { instance = (await os.api("federation/show-instance", {
host: props.host, host: props.host,
})) as AugmentedInstance; })) as AugmentedInstance;