added comments

This commit is contained in:
Polaris 2024-07-23 17:33:15 -04:00
parent ac02b7b901
commit fbf5033b36
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ type chunithm = chuni_score_playlog &
export default async function Share({ export default async function Share({
params, 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 }; params: { token: string; id: string };
}) { }) {
const { token, id } = params; const { token, id } = params;

View File

@ -25,9 +25,9 @@ export async function generateShareToken(id: number): Promise<{
const token = await daphnis.linkSharingToken.create({ const token = await daphnis.linkSharingToken.create({
data: { data: {
playlogId: id, // sets the playlog id playlogId: id, // sets the playlog id
id: randomUUID(), // generates a random share id id: randomUUID(), // generates a random primary id for the share token
userId: user.id, // attaches the userid userId: user.id, // attaches the userid from daphnis
token: gernatetoken, // makes an expirable token token: gernatetoken, // makes an expirable token thats added to the token column
createdAt: new Date(), // created at date createdAt: new Date(), // created at date
}, },
}); });