feat: integrate cross-domain authentication to api

This commit is contained in:
Pujit Mehrotra
2024-10-11 10:45:03 -04:00
parent f6d09f4ba2
commit 754d4560ea
12 changed files with 88 additions and 17 deletions

View File

@@ -38,11 +38,12 @@ watch(notifications, (newVal) => {
const fetchType = ref<"UNREAD" | "ARCHIVED">("UNREAD");
const setFetchType = (type: "UNREAD" | "ARCHIVED") => (fetchType.value = type);
const { unraidApiClient } = storeToRefs(useUnraidApiStore());
const { unraidApiClient: maybeApi } = storeToRefs(useUnraidApiStore());
watch(unraidApiClient, async (newVal) => {
if (newVal) {
const apiResponse = await newVal.query({
watch(maybeApi, async (apiClient) => {
if (apiClient) {
const apiResponse = await apiClient.query({
query: getNotifications,
variables: {
filter: {