allow callers to pass in hint objects to admin-user and instance-info
This commit is contained in:
parent
645e27fc9e
commit
ffa0f06ea0
2 changed files with 33 additions and 15 deletions
|
|
@ -238,9 +238,14 @@ import SkBadgeStrip from '@/components/SkBadgeStrip.vue';
|
|||
|
||||
const $style = useCssModule();
|
||||
|
||||
const props = defineProps<{
|
||||
const props = withDefaults(defineProps<{
|
||||
host: string;
|
||||
}>();
|
||||
metaHint?: Misskey.entities.AdminMetaResponse;
|
||||
instanceHint?: Misskey.entities.FederationInstance;
|
||||
}>(), {
|
||||
metaHint: undefined,
|
||||
instanceHint: undefined,
|
||||
});
|
||||
|
||||
const tab = ref('overview');
|
||||
|
||||
|
|
@ -365,8 +370,8 @@ async function saveModerationNote() {
|
|||
|
||||
async function fetch(): Promise<void> {
|
||||
const [m, i] = await Promise.all([
|
||||
iAmAdmin ? misskeyApi('admin/meta') : null,
|
||||
misskeyApi('federation/show-instance', {
|
||||
props.metaHint ?? (iAmAdmin ? misskeyApi('admin/meta') : null),
|
||||
props.instanceHint ?? misskeyApi('federation/show-instance', {
|
||||
host: props.host,
|
||||
}),
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue