This commit is contained in:
polaris
2024-06-29 02:25:52 -04:00
parent f6c5710335
commit 60824969ec
59 changed files with 96 additions and 95 deletions

View File

@ -2,13 +2,10 @@
import { getAuth } from "@/auth/queries/getauth";
import { artemis } from "@/lib/prisma";
import { daphnis } from "@/lib/prisma";
import { lachesis } from "@/lib/prisma";
export async function getSongsWithTitles(userId: number) {
try {
// Fetch songs from ChuniScorePlaylog
const songs = await artemis.chuni_score_playlog.findMany({
where: {
user: userId,
@ -95,7 +92,7 @@ export async function getSongsWithTitles(userId: number) {
export async function SharingPlaylogId(playlogid: number) {
try {
const tokens = await daphnis.linkSharingToken.findMany({
const tokens = await lachesis.linkSharingToken.findMany({
where: {
playlogId: playlogid,
},
@ -117,7 +114,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 daphnis.user.findFirst({
return await lachesis.user.findFirst({
where: {
id: user.id,
username: user.username,
@ -134,7 +131,7 @@ export async function getAllAimeCards() {
throw new Error("User is not authenticated or accessCode is missing");
}
const aimeUser = await daphnis.user.findMany({
const aimeUser = await lachesis.user.findMany({
where: {
accessCode: user.accessCode,
},