From 3d2986483c12c458952058a82406fc4da292cb3b Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 1 Jul 2025 18:02:00 +0200 Subject: [PATCH] Refactoring --- apps/api/src/services/property/interfaces/interfaces.ts | 1 + apps/api/src/services/property/property.service.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 apps/api/src/services/property/interfaces/interfaces.ts diff --git a/apps/api/src/services/property/interfaces/interfaces.ts b/apps/api/src/services/property/interfaces/interfaces.ts new file mode 100644 index 000000000..be9bc530d --- /dev/null +++ b/apps/api/src/services/property/interfaces/interfaces.ts @@ -0,0 +1 @@ +export type PropertyValue = boolean | object | string | string[]; diff --git a/apps/api/src/services/property/property.service.ts b/apps/api/src/services/property/property.service.ts index 3ed435a89..212635f49 100644 --- a/apps/api/src/services/property/property.service.ts +++ b/apps/api/src/services/property/property.service.ts @@ -6,7 +6,7 @@ import { import { Injectable } from '@nestjs/common'; -type Value = boolean | object | string | string[]; +import { PropertyValue } from './interfaces/interfaces'; @Injectable() export class PropertyService { @@ -20,7 +20,7 @@ export class PropertyService { public async get() { const response: { - [key: string]: Value; + [key: string]: PropertyValue; } = { [PROPERTY_CURRENCIES]: [] }; @@ -40,7 +40,7 @@ export class PropertyService { return response; } - public async getByKey(aKey: string) { + public async getByKey(aKey: string) { const properties = await this.get(); return properties[aKey] as TValue; }