mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 16:22:39 +10:00
feat: refactor news and migrate rest of useFetch to $dropFetch
This commit is contained in:
@ -110,10 +110,7 @@ definePageMeta({
|
||||
layout: "admin",
|
||||
});
|
||||
|
||||
const headers = useRequestHeaders(["cookie"]);
|
||||
const enabledMechanisms = await $dropFetch("/api/v1/admin/auth", {
|
||||
headers,
|
||||
});
|
||||
const enabledMechanisms = await $dropFetch("/api/v1/admin/auth");
|
||||
|
||||
const authenticationMechanisms: Array<{
|
||||
name: string;
|
||||
|
||||
@ -391,12 +391,10 @@ useHead({
|
||||
title: "Simple authentication",
|
||||
});
|
||||
|
||||
const headers = useRequestHeaders(["cookie"]);
|
||||
const { data } = await useFetch<Array<SerializeObject<Invitation>>>(
|
||||
"/api/v1/admin/auth/invitation",
|
||||
{ headers }
|
||||
const data = await $dropFetch<Array<SerializeObject<Invitation>>>(
|
||||
"/api/v1/admin/auth/invitation"
|
||||
);
|
||||
const invitations = ref(data.value ?? []);
|
||||
const invitations = ref(data ?? []);
|
||||
|
||||
const generateInvitationUrl = (id: string) =>
|
||||
`${window.location.protocol}//${window.location.host}/register?id=${id}`;
|
||||
|
||||
Reference in New Issue
Block a user