Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit be0f6ba

Browse files
add comments
1 parent 2dd8f5a commit be0f6ba

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/public/routes/deleteShareableListItems.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const deleteShareableListItemDataSchema: Schema = {
2626
/**
2727
* This method batch deletes shareable list items by url for a user
2828
* @param userId
29+
* @param url
2930
*/
3031
export async function batchDeleteAllListItemsForUser(
3132
userId: number | bigint,
@@ -41,6 +42,7 @@ export async function batchDeleteAllListItemsForUser(
4142
/**
4243
* This method deletes all shareable list item data for a user by url
4344
* @param userId
45+
* @param url
4446
*/
4547
async function deleteShareableListItemUserData(
4648
userId: number | bigint,

src/public/routes/helpers.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Request, Response, NextFunction } from 'express';
22
import { validationResult } from 'express-validator';
33
import { PrismaClient } from '@prisma/client';
4+
45
/**
56
* This method validates the request made to the endpoint
67
* @param req
@@ -18,6 +19,12 @@ export function validate(req: Request, res: Response, next: NextFunction) {
1819
next();
1920
}
2021

22+
/**
23+
* This method returns an array of urls (list item urls) if found for a user
24+
* @param userId
25+
* @param url
26+
* @param db
27+
*/
2128
export async function getShareableListItemUrlsForUser(
2229
userId: number | bigint,
2330
url: string,

0 commit comments

Comments
 (0)