forked from PolarisPyra/daphnis
added comments
This commit is contained in:
parent
ac02b7b901
commit
fbf5033b36
@ -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;
|
||||
|
@ -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
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user