some fixes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref, computed } from "vue";
|
||||
import { registerUser as apiRegisterUser } from "@/api/auth";
|
||||
import { registerUser as apiRegisterUser, loginUser as apiLoginUser } from "@/api/auth";
|
||||
import { getUserProfile as apiGetUserProfile } from "@/api/user";
|
||||
import type { RegisterRequest } from "@/types";
|
||||
import router from "@/router";
|
||||
@@ -26,12 +26,11 @@ export const useAuthStore = defineStore("auth", () => {
|
||||
if (response.data && response.data.properties) {
|
||||
const textureProp = response.data.properties.find((p) => p.name === "textures");
|
||||
if (textureProp) {
|
||||
// Декодируем Base64-строку и парсим JSON
|
||||
const textureData = JSON.parse(atob(textureProp.value));
|
||||
if (textureData.textures?.SKIN?.url) {
|
||||
skinUrl.value = textureData.textures.SKIN.url;
|
||||
} else {
|
||||
skinUrl.value = null; // У пользователя нет скина
|
||||
skinUrl.value = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user