From faf458adddd7bf90394ce83f25da475168da0672 Mon Sep 17 00:00:00 2001 From: ErickCelestino Date: Fri, 19 May 2023 01:00:38 -0300 Subject: [PATCH] transforming data[0] in object data --- .../src/lib/infrastructure/schedule-storage.repository.impl.ts | 2 +- .../src/lib/infrastructure/team-storage.repository.impl.ts | 2 +- package.json | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/data-access/src/lib/infrastructure/schedule-storage.repository.impl.ts b/libs/data-access/src/lib/infrastructure/schedule-storage.repository.impl.ts index 902c1d3..9d06c97 100644 --- a/libs/data-access/src/lib/infrastructure/schedule-storage.repository.impl.ts +++ b/libs/data-access/src/lib/infrastructure/schedule-storage.repository.impl.ts @@ -46,7 +46,7 @@ export class ScheduleStorageRepositoryImpl findAll() { let data = this.read(); - const isOutdated = 'time' in data[0]; + const isOutdated = 'time' in data; data = data.map(refactorSchedule); diff --git a/libs/data-access/src/lib/infrastructure/team-storage.repository.impl.ts b/libs/data-access/src/lib/infrastructure/team-storage.repository.impl.ts index 9b78dad..c84d02d 100644 --- a/libs/data-access/src/lib/infrastructure/team-storage.repository.impl.ts +++ b/libs/data-access/src/lib/infrastructure/team-storage.repository.impl.ts @@ -47,7 +47,7 @@ export class TeamStorageRepositoryImpl findAll() { let data = this.read(); - const isOutdated = 'team' in data[0]; + const isOutdated = 'team' in data; data = data.map(refactorTeam); diff --git a/package.json b/package.json index f3a40e8..909d850 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "license": "MIT", "scripts": { "build": "nx run getlab:build", - "nx": "npx nx" + "nx": "npx nx", + "start": "npx nx serve getlab" }, "private": false, "devDependencies": {