changed to Daphnis
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
import { getAuth } from "@/auth/queries/getauth";
|
||||
import { artemis } from "@/lib/prisma";
|
||||
import { lachesis } from "@/lib/prisma";
|
||||
import { daphnis } from "@/lib/prisma";
|
||||
|
||||
export const LinkAimeCard = async (formData: FormData) => {
|
||||
const { user } = await getAuth();
|
||||
@ -12,8 +12,8 @@ export const LinkAimeCard = async (formData: FormData) => {
|
||||
};
|
||||
|
||||
try {
|
||||
// Check if access code is already used by another user in lachesis database
|
||||
const existingUserWithAccessCode = await lachesis.user.findFirst({
|
||||
// Check if access code is already used by another user in daphnis database
|
||||
const existingUserWithAccessCode = await daphnis.user.findFirst({
|
||||
where: {
|
||||
accessCode: formDataRaw.accessCode,
|
||||
id: {
|
||||
@ -37,7 +37,7 @@ export const LinkAimeCard = async (formData: FormData) => {
|
||||
throw new Error("Not in artemis's database, Nice try ^_^");
|
||||
}
|
||||
|
||||
const userHoldsAccessCode = await lachesis.user.findFirst({
|
||||
const userHoldsAccessCode = await daphnis.user.findFirst({
|
||||
where: {
|
||||
accessCode: formDataRaw.accessCode,
|
||||
},
|
||||
@ -48,7 +48,7 @@ export const LinkAimeCard = async (formData: FormData) => {
|
||||
}
|
||||
|
||||
// Update current user's access code
|
||||
await lachesis.user.update({
|
||||
await daphnis.user.update({
|
||||
where: {
|
||||
id: user?.id,
|
||||
},
|
||||
|
Reference in New Issue
Block a user