cleanup
This commit is contained in:
13
lib/api.ts
13
lib/api.ts
@ -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,
|
||||
},
|
||||
|
Reference in New Issue
Block a user