From 719240c78f93536461ea20b869e3e3eff9c84488 Mon Sep 17 00:00:00 2001 From: Claudemir Todo Bom Date: Fri, 23 Aug 2024 16:24:17 -0300 Subject: [PATCH] CheckSettings.ts: prettier --- backend/src/helpers/CheckSettings.ts | 30 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/backend/src/helpers/CheckSettings.ts b/backend/src/helpers/CheckSettings.ts index 22f7e679..b6cead7f 100644 --- a/backend/src/helpers/CheckSettings.ts +++ b/backend/src/helpers/CheckSettings.ts @@ -1,13 +1,15 @@ import Setting from "../models/Setting"; import AppError from "../errors/AppError"; -const CheckSettings = async (key: string, defaultValue: string = null ): Promise => { +const CheckSettings = async ( + key: string, + defaultValue: string = null +): Promise => { const setting = await Setting.findOne({ - where: - { - companyId: 1, - key - } + where: { + companyId: 1, + key + } }); if (!setting && !defaultValue) { @@ -17,13 +19,16 @@ const CheckSettings = async (key: string, defaultValue: string = null ): Promise return setting?.value || defaultValue; }; -export const GetCompanySetting = async (companyId: number, key: string, defaultValue: string = null ): Promise => { +export const GetCompanySetting = async ( + companyId: number, + key: string, + defaultValue: string = null +): Promise => { const setting = await Setting.findOne({ - where: - { - companyId, - key - } + where: { + companyId, + key + } }); if (!setting && !defaultValue) { @@ -33,5 +38,4 @@ export const GetCompanySetting = async (companyId: number, key: string, defaultV return setting?.value || defaultValue; }; - export default CheckSettings;