From 6b92e2cc6c97c3e65a0af994e565fea7568f9b36 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 14:38:48 +0000 Subject: [PATCH] style: format code with Prettier and StandardJS This commit fixes the style issues introduced in 96e308c according to the output from Prettier and StandardJS. Details: https://github.com/AnkanSaha/outers/pull/182 --- source/Functions/Read Request Count.ts | 39 +++++++++++++------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/source/Functions/Read Request Count.ts b/source/Functions/Read Request Count.ts index fdd3ebe..1700008 100644 --- a/source/Functions/Read Request Count.ts +++ b/source/Functions/Read Request Count.ts @@ -1,14 +1,13 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import {StorageInstance} from '../Middlewares/User Counter/Base.middleware'; // Import The Storage for Read Request Count +import { StorageInstance } from "../Middlewares/User Counter/Base.middleware"; // Import The Storage for Read Request Count // Interface for Read Request Count -interface ReturnData - { - status: number; - message: string; - Data: any[]; - TotalData: number; - } +interface ReturnData { + status: number; + message: string; + Data: any[]; + TotalData: number; +} // Main Function /** @@ -21,15 +20,17 @@ interface ReturnData * @throws {Error} - If unable to read the request count from the storage. */ export default async function (RequestDate: string): Promise { - try { - if(RequestDate === undefined || RequestDate === null || RequestDate === '') { - return await StorageInstance.Get(); // Get All Data in Storage File - } - else { - return await StorageInstance.Get(RequestDate) - } - } - catch (error) { - throw new Error("Unable to read the request count from the storage."); + try { + if ( + RequestDate === undefined || + RequestDate === null || + RequestDate === "" + ) { + return await StorageInstance.Get(); // Get All Data in Storage File + } else { + return await StorageInstance.Get(RequestDate); } -} \ No newline at end of file + } catch (error) { + throw new Error("Unable to read the request count from the storage."); + } +}