removed access code check was causing issues just checking for the user should be good enough

This commit is contained in:
Polaris 2024-09-16 22:09:57 -04:00
parent e853ca248a
commit 5e91b3c306

View File

@ -20,8 +20,8 @@ export const getUsername = async () => {
export async function getAllAimeCards() {
const { user } = await getAuth();
if (!user || !user.accessCode) {
throw new Error("User is not authenticated or accessCode is missing");
if (!user) {
throw new Error("User is not authenticated");
}
const aimeUser = await daphnis.user.findMany({
@ -35,8 +35,8 @@ export async function getAllAimeCards() {
export async function verifyAimeCodeAgainstArtemis() {
const { user } = await getAuth();
if (!user || !user.accessCode) {
throw new Error("User is not authenticated or accessCode is missing");
if (!user) {
throw new Error("User is not authenticated");
}
const aimeUser = await artemis.aime_card.findFirst({
@ -59,8 +59,8 @@ const GameVersionToNumber: Record<GameVersion, number> = {
export async function getGameVersion(): Promise<GameVersion> {
const { user } = await getAuth();
if (!user || !user.accessCode) {
throw new Error("User is not authenticated or accessCode is missing");
if (!user) {
throw new Error("User is not authenticated");
}
const aimeUser = await daphnis.user.findFirst({