changed to Daphnis
This commit is contained in:
10
lib/api.ts
10
lib/api.ts
@ -2,7 +2,9 @@
|
||||
|
||||
import { getAuth } from "@/auth/queries/getauth";
|
||||
import { artemis } from "@/lib/prisma";
|
||||
import { lachesis } from "@/lib/prisma";
|
||||
import { daphnis } from "@/lib/prisma";
|
||||
|
||||
|
||||
export async function getSongsWithTitles(userId: number) {
|
||||
try {
|
||||
// Fetch songs from ChuniScorePlaylog
|
||||
@ -92,7 +94,7 @@ export async function getSongsWithTitles(userId: number) {
|
||||
|
||||
export async function SharingPlaylogId(playlogid: number) {
|
||||
try {
|
||||
const tokens = await lachesis.linkSharingToken.findMany({
|
||||
const tokens = await daphnis.linkSharingToken.findMany({
|
||||
where: {
|
||||
playlogId: playlogid,
|
||||
},
|
||||
@ -114,7 +116,7 @@ export async function SharingPlaylogId(playlogid: number) {
|
||||
export const getUsername = async () => {
|
||||
const { user } = await getAuth(); // Assuming getAuth() returns an auth object with user info
|
||||
if (user) {
|
||||
return await lachesis.user.findFirst({
|
||||
return await daphnis.user.findFirst({
|
||||
where: {
|
||||
id: user.id,
|
||||
username: user.username,
|
||||
@ -131,7 +133,7 @@ export async function getAllAimeCards() {
|
||||
throw new Error("User is not authenticated or accessCode is missing");
|
||||
}
|
||||
|
||||
const aimeUser = await lachesis.user.findMany({
|
||||
const aimeUser = await daphnis.user.findMany({
|
||||
where: {
|
||||
accessCode: user.accessCode,
|
||||
},
|
||||
|
Reference in New Issue
Block a user