changed form reset and fixed systemvoice

This commit is contained in:
Polaris
2024-08-26 20:06:33 -04:00
parent bfe2403076
commit e22708f98a
9 changed files with 19 additions and 79 deletions

View File

@ -36,20 +36,6 @@ export async function updatePlayerSystemVoiceId(voiceId: number) {
throw new Error("nameplateId is required");
}
const checkIfSystemVoiceIsUnlocked = await artemis.chuni_item_item.findMany({
where: {
itemKind: 10,
user: user.UserId,
},
select: {
itemId: true,
},
});
const unlockedSystemVoices = checkIfSystemVoiceIsUnlocked.map(
(item) => item.itemId,
);
try {
const updatePlayerNameplate = await artemis.chuni_profile_data.update({
where: {
@ -63,9 +49,7 @@ export async function updatePlayerSystemVoiceId(voiceId: number) {
},
});
console.log(updatePlayerNameplate);
return unlockedSystemVoices;
return updatePlayerNameplate;
} catch (error) {
console.error("Error updating nameplate:", error);
throw error;