variable clean up

This commit is contained in:
Polaris
2024-07-28 01:16:27 -04:00
parent e113bad219
commit d01a88a645
5 changed files with 42 additions and 41 deletions

View File

@ -14,7 +14,7 @@ export async function getCurrentAvatarParts() {
throw new Error("User is not authenticated or accessCode is missing"); throw new Error("User is not authenticated or accessCode is missing");
} }
const avatarParts = await artemis.chuni_profile_data.findMany({ const CurrentAvatarParts = await artemis.chuni_profile_data.findMany({
where: { where: {
user: user.UserId, user: user.UserId,
}, },
@ -28,7 +28,7 @@ export async function getCurrentAvatarParts() {
avatarWear: true, avatarWear: true,
}, },
}); });
return avatarParts; return CurrentAvatarParts;
} }
export async function getAllAvatarParts(category: number) { export async function getAllAvatarParts(category: number) {
@ -38,7 +38,7 @@ export async function getAllAvatarParts(category: number) {
throw new Error("User is not authenticated or accessCode is missing"); throw new Error("User is not authenticated or accessCode is missing");
} }
const avatarParts = await artemis.chuni_static_avatar.findMany({ const AllAvatarParts = await artemis.chuni_static_avatar.findMany({
where: { where: {
category: category, category: category,
}, },
@ -52,5 +52,5 @@ export async function getAllAvatarParts(category: number) {
texturePath: true, texturePath: true,
}, },
}); });
return avatarParts; return AllAvatarParts;
} }

View File

@ -14,7 +14,7 @@ export async function getCurrentMapIcon() {
throw new Error("User is not authenticated or accessCode is missing"); throw new Error("User is not authenticated or accessCode is missing");
} }
const nameplates = await artemis.chuni_profile_data.findMany({ const currentMapIcon = await artemis.chuni_profile_data.findMany({
where: { where: {
user: user.UserId, user: user.UserId,
}, },
@ -22,8 +22,7 @@ export async function getCurrentMapIcon() {
mapIconId: true, mapIconId: true,
}, },
}); });
console.log(nameplates); return currentMapIcon;
return nameplates;
} }
export async function getMapIcons() { export async function getMapIcons() {
@ -33,7 +32,7 @@ export async function getMapIcons() {
throw new Error("User is not authenticated or accessCode is missing"); throw new Error("User is not authenticated or accessCode is missing");
} }
const nameplates = await artemis.cozynet_chuni_static_mapicon.findMany({ const AllMapIcons = await artemis.cozynet_chuni_static_mapicon.findMany({
select: { select: {
id: true, id: true,
str: true, str: true,
@ -44,5 +43,5 @@ export async function getMapIcons() {
netOpenName: true, netOpenName: true,
}, },
}); });
return nameplates; return AllMapIcons;
} }

View File

@ -14,7 +14,7 @@ export async function getCurrentNameplate() {
throw new Error("User is not authenticated or accessCode is missing"); throw new Error("User is not authenticated or accessCode is missing");
} }
const nameplates = await artemis.chuni_profile_data.findMany({ const currentNameplate = await artemis.chuni_profile_data.findMany({
where: { where: {
user: user.UserId, user: user.UserId,
}, },
@ -22,7 +22,7 @@ export async function getCurrentNameplate() {
nameplateId: true, nameplateId: true,
}, },
}); });
return nameplates; return currentNameplate;
} }
export async function getNamePlates() { export async function getNamePlates() {
@ -32,7 +32,7 @@ export async function getNamePlates() {
throw new Error("User is not authenticated or accessCode is missing"); throw new Error("User is not authenticated or accessCode is missing");
} }
const nameplates = await artemis.cozynet_chuni_static_nameplate.findMany({ const AllNameplates = await artemis.cozynet_chuni_static_nameplate.findMany({
select: { select: {
id: true, id: true,
str: true, str: true,
@ -43,5 +43,5 @@ export async function getNamePlates() {
netOpenName: true, netOpenName: true,
}, },
}); });
return nameplates; return AllNameplates;
} }

View File

@ -14,7 +14,7 @@ export async function getCurrentSystemVoice() {
throw new Error("User is not authenticated or accessCode is missing"); throw new Error("User is not authenticated or accessCode is missing");
} }
const nameplates = await artemis.chuni_profile_data.findMany({ const currentSystemVoice = await artemis.chuni_profile_data.findMany({
where: { where: {
user: user.UserId, user: user.UserId,
}, },
@ -22,7 +22,7 @@ export async function getCurrentSystemVoice() {
voiceId: true, voiceId: true,
}, },
}); });
return nameplates; return currentSystemVoice;
} }
export async function getSystemVoices() { export async function getSystemVoices() {
@ -32,16 +32,17 @@ export async function getSystemVoices() {
throw new Error("User is not authenticated or accessCode is missing"); throw new Error("User is not authenticated or accessCode is missing");
} }
const nameplates = await artemis.cozynet_chuni_static_systemvoice.findMany({ const AllSystemVoices =
select: { await artemis.cozynet_chuni_static_systemvoice.findMany({
id: true, select: {
str: true, id: true,
sortName: true, str: true,
category: true, sortName: true,
imagePath: true, category: true,
rareType: true, imagePath: true,
netOpenName: true, rareType: true,
}, netOpenName: true,
}); },
return nameplates; });
return AllSystemVoices;
} }

View File

@ -11,7 +11,7 @@ export async function getCurrentTrophies() {
throw new Error("User is not authenticated or accessCode is missing"); throw new Error("User is not authenticated or accessCode is missing");
} }
const avatarParts = await artemis.chuni_profile_data.findMany({ const CurrentTrophy = await artemis.chuni_profile_data.findMany({
where: { where: {
user: user.UserId, user: user.UserId,
}, },
@ -19,7 +19,7 @@ export async function getCurrentTrophies() {
trophyId: true, trophyId: true,
}, },
}); });
return avatarParts; return CurrentTrophy;
} }
export async function getTrophies() { export async function getTrophies() {
@ -29,16 +29,17 @@ export async function getTrophies() {
throw new Error("User is not authenticated or accessCode is missing"); throw new Error("User is not authenticated or accessCode is missing");
} }
const staticTrophies = await artemis.cozynet_chuni_static_trophies.findMany({ const AllStaticTrophies =
select: { await artemis.cozynet_chuni_static_trophies.findMany({
category: true, select: {
netOpenName: true, category: true,
id: true, netOpenName: true,
str: true, id: true,
imagePath: true, str: true,
rareType: true, imagePath: true,
sortName: true, rareType: true,
}, sortName: true,
}); },
return staticTrophies; });
return AllStaticTrophies;
} }