diff --git a/apps/backend/src/app/files/files.service.ts b/apps/backend/src/app/files/files.service.ts index 8662e9c..18d2242 100644 --- a/apps/backend/src/app/files/files.service.ts +++ b/apps/backend/src/app/files/files.service.ts @@ -123,6 +123,14 @@ export class FilesService { } } + /** + * Searches for files in the database based on the provided search field, limit, and offset. + * + * @param {number} limit - The maximum number of results to return. + * @param {number} offset - The offset for the results. + * @param {string} searchField - The value to search for within the file names. + * @return {Promise>} A promise that resolves to an object containing the count of files that match the search criteria, the provided limit, the current offset, and the matching data. + */ public async search(limit: number, offset: number, searchField: string): Promise> { try { const countResult = await this.database.use()