From d435f53998b5369b01c0aa818e093fbfd4e8f250 Mon Sep 17 00:00:00 2001 From: csehatt741 Date: Tue, 1 Jul 2025 09:22:42 +0200 Subject: [PATCH] code review changes --- apps/api/src/services/property/property.service.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/api/src/services/property/property.service.ts b/apps/api/src/services/property/property.service.ts index 37944eb1b..3ed435a89 100644 --- a/apps/api/src/services/property/property.service.ts +++ b/apps/api/src/services/property/property.service.ts @@ -6,6 +6,8 @@ import { import { Injectable } from '@nestjs/common'; +type Value = boolean | object | string | string[]; + @Injectable() export class PropertyService { public constructor(private readonly prismaService: PrismaService) {} @@ -18,7 +20,7 @@ export class PropertyService { public async get() { const response: { - [key: string]: boolean | object | string | string[]; + [key: string]: Value; } = { [PROPERTY_CURRENCIES]: [] }; @@ -38,9 +40,9 @@ export class PropertyService { return response; } - public async getByKey(aKey: string): Promise { + public async getByKey(aKey: string) { const properties = await this.get(); - return properties?.[aKey] as TKey; + return properties[aKey] as TValue; } public async isUserSignupEnabled() {