chore: formatting

This commit is contained in:
2025-05-06 14:37:07 +02:00
parent ae373b3528
commit ca1a50551e
9 changed files with 47 additions and 50 deletions
+5 -4
View File
@@ -1,5 +1,6 @@
import { defineStore } from "pinia";
import { UserResponseDTO } from "~/netcode/events/dto/userresponse.dto";
import { type FetchContext } from "ofetch";
export const useUserStore = defineStore("user", {
state: () => ({
@@ -18,7 +19,7 @@ export const useUserStore = defineStore("user", {
{
credentials: "include",
immediate: true,
}
},
);
if (data.data.value) {
this.users[data.data.value.id] = data.data.value;
@@ -33,15 +34,15 @@ export const useUserStore = defineStore("user", {
credentials: "include",
server: false,
immediate: true,
onResponse: (data) => {
if (data.response.ok) {
onResponse: (data: FetchContext<UserResponseDTO>) => {
if (data.response && data.response.ok && data.response._data) {
this.self = data.response._data;
}
this.has_contacted = true;
},
lazy: true,
}
},
);
return req;
},