🚑 Fix double message

This commit is contained in:
SebClem 2022-06-18 16:55:21 +02:00
parent f6baab77ed
commit 4ca92aae06
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
2 changed files with 9 additions and 11 deletions

View File

@ -46,11 +46,7 @@ import { useInviteLinkStore } from "@/stores/inviteLink";
import { useMutualGuildsStore } from "@/stores/mutualGuilds"; import { useMutualGuildsStore } from "@/stores/mutualGuilds";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
import { onBeforeMount } from "vue"; import { onBeforeMount } from "vue";
import { import { useRouter, type RouteLocationRaw } from "vue-router";
useRouter,
type RouteLocation,
type RouteLocationRaw,
} from "vue-router";
const inviteLinkStore = useInviteLinkStore(); const inviteLinkStore = useInviteLinkStore();

View File

@ -22,12 +22,14 @@ function getMutualGuilds(): Promise<Guild[]> {
.catch((reason) => { .catch((reason) => {
console.error(`Fail to get mutal guilds !`); console.error(`Fail to get mutal guilds !`);
console.log(reason); console.log(reason);
const eventQueuStore = useEventQueuStore(); if (reason?.response.status != 401) {
eventQueuStore.push({ const eventQueuStore = useEventQueuStore();
uuid: undefined, eventQueuStore.push({
type: "error", uuid: undefined,
text: "Fail to retrive guilds !", type: "error",
}); text: "Fail to retrive guilds !",
});
}
reject(reason); reject(reason);
}); });
}); });