added chunithm version selector in admin settings
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
"use server";
|
||||
|
||||
import { getAuth } from "@/auth/queries/getauth";
|
||||
import { supportedVersionNumber } from "@/lib/helpers";
|
||||
import { getSupportedVersionNumber } from "@/lib/api";
|
||||
import { artemis } from "@/lib/prisma";
|
||||
|
||||
export async function getCurrentSystemVoice() {
|
||||
const { user } = await getAuth();
|
||||
const supportedVersionNumber = await getSupportedVersionNumber();
|
||||
|
||||
if (!user || !user.accessCode) {
|
||||
throw new Error("User is not authenticated or accessCode is missing");
|
||||
@ -25,6 +26,7 @@ export async function getCurrentSystemVoice() {
|
||||
|
||||
export async function updatePlayerSystemVoiceId(voiceId: number) {
|
||||
const { user } = await getAuth();
|
||||
const supportedVersionNumber = await getSupportedVersionNumber();
|
||||
|
||||
if (!user || !user.accessCode) {
|
||||
throw new Error("User is not authenticated or accessCode is missing");
|
||||
@ -63,7 +65,7 @@ export async function updatePlayerSystemVoiceId(voiceId: number) {
|
||||
|
||||
console.log(updatePlayerNameplate);
|
||||
|
||||
return updatePlayerNameplate;
|
||||
return unlockedSystemVoices;
|
||||
} catch (error) {
|
||||
console.error("Error updating nameplate:", error);
|
||||
throw error;
|
||||
|
@ -143,7 +143,7 @@ export const SystemVoiceCustomization: FC<SystemVoiceSelectionProps> = ({
|
||||
name="PlayerSystemVoice"
|
||||
render={({ field }) => (
|
||||
<FormItem className="flex flex-col">
|
||||
<FormLabel>Select System Voice</FormLabel>
|
||||
<FormLabel className="pb-2">Select System Voice</FormLabel>
|
||||
<Popover>
|
||||
<PopoverTrigger asChild>
|
||||
<FormControl>
|
||||
|
Reference in New Issue
Block a user