fix: type error in devices page

This commit is contained in:
Huskydog9988
2025-04-06 13:47:55 -04:00
parent d6d457f999
commit 4fd2b159a6

View File

@ -93,7 +93,7 @@
import { CheckIcon } from "@heroicons/vue/24/outline"; import { CheckIcon } from "@heroicons/vue/24/outline";
import moment from "moment"; import moment from "moment";
const clients = ref(await $dropFetch("/api/v1/user/client")); const clients = await $dropFetch("/api/v1/user/client");
async function revokeClient(id: string) { async function revokeClient(id: string) {
await $dropFetch(`/api/v1/user/client/${id}`, { method: "DELETE" }); await $dropFetch(`/api/v1/user/client/${id}`, { method: "DELETE" });
@ -102,8 +102,8 @@ async function revokeClient(id: string) {
function revokeClientWrapper(id: string) { function revokeClientWrapper(id: string) {
revokeClient(id) revokeClient(id)
.then(() => { .then(() => {
const index = clients.value.findIndex((e) => e.id == id); const index = clients.findIndex((e) => e.id == id);
clients.value.splice(index, 1); clients.splice(index, 1);
}) })
.catch((e) => { .catch((e) => {
createModal( createModal(