mirror of https://github.com/hykilpikonna/AquaDX
Modify way to get user luid
parent
ec1155b1ba
commit
bca5130020
|
@ -154,14 +154,8 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchData(card: string) {
|
async function fetchData() {
|
||||||
const userId = await USERBOX.getAimeId(card);
|
const currentValues = await USERBOX.getProfile(aimeId).catch((e) => {
|
||||||
|
|
||||||
if (!userId) return;
|
|
||||||
|
|
||||||
aimeId = userId.luid;
|
|
||||||
|
|
||||||
const currentValues = await USERBOX.getProfile(userId.luid).catch((e) => {
|
|
||||||
loading = false;
|
loading = false;
|
||||||
error = t("userbox.error.noprofile")
|
error = t("userbox.error.noprofile")
|
||||||
return;
|
return;
|
||||||
|
@ -195,7 +189,7 @@
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
userBoxItems.map(async (kind) => {
|
userBoxItems.map(async (kind) => {
|
||||||
// Populate info about the items
|
// Populate info about the items
|
||||||
return USERBOX.getUnlockedItems(userId.luid, kind).then((items) => {
|
return USERBOX.getUnlockedItems(aimeId, kind).then((items) => {
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case UserBoxItemKind.nameplate:
|
case UserBoxItemKind.nameplate:
|
||||||
// Add the item id and the label to the available options
|
// Add the item id and the label to the available options
|
||||||
|
@ -347,8 +341,10 @@
|
||||||
user = u;
|
user = u;
|
||||||
const card = user.cards.length > 0 ? user.cards[0].luid : "";
|
const card = user.cards.length > 0 ? user.cards[0].luid : "";
|
||||||
|
|
||||||
if (card) {
|
aimeId = card;
|
||||||
fetchData(card);
|
|
||||||
|
if (aimeId) {
|
||||||
|
fetchData();
|
||||||
} else {
|
} else {
|
||||||
loading = false;
|
loading = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue