diff --git a/app/(sharing)/[token]/[id]/page.tsx b/app/(sharing)/[token]/[id]/page.tsx index f93fc07..31b4506 100644 --- a/app/(sharing)/[token]/[id]/page.tsx +++ b/app/(sharing)/[token]/[id]/page.tsx @@ -13,7 +13,7 @@ type chunithm = chuni_score_playlog & export default async function Share({ params, }: { - // pass the token and playlog id as params + // pass the token and playlog id as params www.www.com/generatedtoken/playlogid params: { token: string; id: string }; }) { const { token, id } = params; diff --git a/app/(sharing)/[token]/token.ts b/app/(sharing)/[token]/token.ts index 8450e18..eb82cfb 100644 --- a/app/(sharing)/[token]/token.ts +++ b/app/(sharing)/[token]/token.ts @@ -25,9 +25,9 @@ export async function generateShareToken(id: number): Promise<{ const token = await daphnis.linkSharingToken.create({ data: { playlogId: id, // sets the playlog id - id: randomUUID(), // generates a random share id - userId: user.id, // attaches the userid - token: gernatetoken, // makes an expirable token + id: randomUUID(), // generates a random primary id for the share token + userId: user.id, // attaches the userid from daphnis + token: gernatetoken, // makes an expirable token thats added to the token column createdAt: new Date(), // created at date }, });