forked from PolarisPyra/daphnis
sharing fix
This commit is contained in:
parent
bde370314e
commit
30825e20f1
@ -13,7 +13,7 @@ import {
|
|||||||
import { Label } from "@/components/ui/label";
|
import { Label } from "@/components/ui/label";
|
||||||
import { useToast } from "@/components/ui/use-toast";
|
import { useToast } from "@/components/ui/use-toast";
|
||||||
import { LinkAimeCard } from "@/lib/LinkNewAccessCode";
|
import { LinkAimeCard } from "@/lib/LinkNewAccessCode";
|
||||||
import { getLachesisInUseCards } from "@/lib/GetUserAccessCode";
|
import { getDaphnisInUseCards } from "@/lib/GetUserAccessCode";
|
||||||
import SettingsSubMenuNavigation from "@/components/navigationbar/settingsnavigation";
|
import SettingsSubMenuNavigation from "@/components/navigationbar/settingsnavigation";
|
||||||
|
|
||||||
const GeneralSettings = () => {
|
const GeneralSettings = () => {
|
||||||
@ -31,7 +31,7 @@ const GeneralSettings = () => {
|
|||||||
|
|
||||||
const fetchCurrentAccessCode = async () => {
|
const fetchCurrentAccessCode = async () => {
|
||||||
try {
|
try {
|
||||||
const aimeUser = await getLachesisInUseCards();
|
const aimeUser = await getDaphnisInUseCards();
|
||||||
if (aimeUser) {
|
if (aimeUser) {
|
||||||
setCurrentAccessCode(aimeUser.accessCode || null);
|
setCurrentAccessCode(aimeUser.accessCode || null);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import { getAuth } from "@/auth/queries/getauth";
|
import { getAuth } from "@/auth/queries/getauth";
|
||||||
import { daphnis } from "@/lib/prisma";
|
import { daphnis } from "@/lib/prisma";
|
||||||
|
|
||||||
export async function getdaphnisInUseCards() {
|
export async function getDaphnisInUseCards() {
|
||||||
const { user } = await getAuth();
|
const { user } = await getAuth();
|
||||||
|
|
||||||
if (!user || !user.accessCode) {
|
if (!user || !user.accessCode) {
|
||||||
|
@ -95,7 +95,7 @@ export async function getSongsWithTitles(userId: number) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function SharingPlaylogId(playlogid: number) {
|
export async function generatePlaylogId(playlogid: number) {
|
||||||
try {
|
try {
|
||||||
const tokens = await daphnis.linkSharingToken.findMany({
|
const tokens = await daphnis.linkSharingToken.findMany({
|
||||||
where: {
|
where: {
|
||||||
|
Loading…
Reference in New Issue
Block a user