From 4538b93162d0e54b45027da13dc7ca598641a8f5 Mon Sep 17 00:00:00 2001 From: Kushagra Singh Bisen Date: Thu, 7 Mar 2024 10:46:23 +0100 Subject: [PATCH] fixes: linting errors. --- src/service/CacheService.ts | 2 +- src/utils/FetchUtil.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/service/CacheService.ts b/src/service/CacheService.ts index 92d3ca7..8555375 100644 --- a/src/service/CacheService.ts +++ b/src/service/CacheService.ts @@ -92,7 +92,7 @@ export class CacheService { * Get all key-value pairs from the Redis cache. * This method is not recommended for large databases, as it will load all key-value pairs into memory and be slow. * However, it is useful for notification caching, where the database is expected to be small to get the missing notifications. - * @return {Promise<{ [key: string]: string }>} - A promise that resolves to an object containing all key-value pairs in the cache. + * @returns {Promise<{ [key: string]: string }>} - A promise that resolves to an object containing all key-value pairs in the cache. * @memberof CacheService */ async read_whole_database(): Promise<{ [key: string]: string }> { diff --git a/src/utils/FetchUtil.ts b/src/utils/FetchUtil.ts index c717d35..8a5d28a 100644 --- a/src/utils/FetchUtil.ts +++ b/src/utils/FetchUtil.ts @@ -1,6 +1,16 @@ import { Readable } from "stream" import { CacheService } from "../service/CacheService"; const cache_service = new CacheService(); +/** + * Fetches the members from the cache service between the specified dates. + * @param {{ + * from?: Date, + * until?: Date, + * }} [opts] - The options for the fetch. + * @param {Date} [opts.from] - The start date. + * @param {Date} [opts.until] - The end date. + * @returns {Promise} - A promise that resolves to a readable stream of the members. + */ export async function getMembers(opts?: { from?: Date, until?: Date,