removed access code check was causing issues just checking for the user should be good enough
This commit is contained in:
parent
e853ca248a
commit
5e91b3c306
12
lib/api.ts
12
lib/api.ts
@ -20,8 +20,8 @@ export const getUsername = async () => {
|
|||||||
export async function getAllAimeCards() {
|
export async function getAllAimeCards() {
|
||||||
const { user } = await getAuth();
|
const { user } = await getAuth();
|
||||||
|
|
||||||
if (!user || !user.accessCode) {
|
if (!user) {
|
||||||
throw new Error("User is not authenticated or accessCode is missing");
|
throw new Error("User is not authenticated");
|
||||||
}
|
}
|
||||||
|
|
||||||
const aimeUser = await daphnis.user.findMany({
|
const aimeUser = await daphnis.user.findMany({
|
||||||
@ -35,8 +35,8 @@ export async function getAllAimeCards() {
|
|||||||
export async function verifyAimeCodeAgainstArtemis() {
|
export async function verifyAimeCodeAgainstArtemis() {
|
||||||
const { user } = await getAuth();
|
const { user } = await getAuth();
|
||||||
|
|
||||||
if (!user || !user.accessCode) {
|
if (!user) {
|
||||||
throw new Error("User is not authenticated or accessCode is missing");
|
throw new Error("User is not authenticated");
|
||||||
}
|
}
|
||||||
|
|
||||||
const aimeUser = await artemis.aime_card.findFirst({
|
const aimeUser = await artemis.aime_card.findFirst({
|
||||||
@ -59,8 +59,8 @@ const GameVersionToNumber: Record<GameVersion, number> = {
|
|||||||
export async function getGameVersion(): Promise<GameVersion> {
|
export async function getGameVersion(): Promise<GameVersion> {
|
||||||
const { user } = await getAuth();
|
const { user } = await getAuth();
|
||||||
|
|
||||||
if (!user || !user.accessCode) {
|
if (!user) {
|
||||||
throw new Error("User is not authenticated or accessCode is missing");
|
throw new Error("User is not authenticated");
|
||||||
}
|
}
|
||||||
|
|
||||||
const aimeUser = await daphnis.user.findFirst({
|
const aimeUser = await daphnis.user.findFirst({
|
||||||
|
Loading…
Reference in New Issue
Block a user