Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Clean up (#2390)

Thomas Kaul01b6bb5b9912
diff --git a/apps/api/src/app/platform/platform.controller.ts b/apps/api/src/app/platform/platform.controller.ts
index 8c4d62bd6c..0369da8a3b 100644
--- a/apps/api/src/app/platform/platform.controller.ts
+++ b/apps/api/src/app/platform/platform.controller.ts
@@ -47,6 +47,7 @@ export class PlatformController {
StatusCodes.FORBIDDEN
);
}
+
return this.platformService.createPlatform(data);
}
diff --git a/apps/api/src/app/platform/platform.service.ts b/apps/api/src/app/platform/platform.service.ts
index 12d1076040..35730d0411 100644
--- a/apps/api/src/app/platform/platform.service.ts
+++ b/apps/api/src/app/platform/platform.service.ts
@@ -6,6 +6,18 @@ import { Platform, Prisma } from '@prisma/client';
export class PlatformService {
public constructor(private readonly prismaService: PrismaService) {}
+ public async createPlatform(data: Prisma.PlatformCreateInput) {
+ return this.prismaService.platform.create({
+ data
+ });
+ }
+
+ public async deletePlatform(
+ where: Prisma.PlatformWhereUniqueInput
+ ): Promise<Platform> {
+ return this.prismaService.platform.delete({ where });
+ }
+
public async getPlatform(
platformWhereUniqueInput: Prisma.PlatformWhereUniqueInput
): Promise<Platform> {
@@ -56,12 +68,6 @@ export class PlatformService {
});
}
- public async createPlatform(data: Prisma.PlatformCreateInput) {
- return this.prismaService.platform.create({
- data
- });
- }
-
public async updatePlatform({
data,
where
@@ -74,10 +80,4 @@ export class PlatformService {
where
});
}
-
- public async deletePlatform(
- where: Prisma.PlatformWhereUniqueInput
- ): Promise<Platform> {
- return this.prismaService.platform.delete({ where });
- }
}
diff --git a/apps/client/src/app/components/admin-platform/admin-platform.component.ts b/apps/client/src/app/components/admin-platform/admin-platform.component.ts
index f3fbb348d2..f8f1f4b58d 100644
--- a/apps/client/src/app/components/admin-platform/admin-platform.component.ts
+++ b/apps/client/src/app/components/admin-platform/admin-platform.component.ts
@@ -114,6 +114,7 @@ export class AdminPlatformComponent implements OnInit, OnDestroy {
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe((platforms) => {
this.platforms = platforms;
+
this.dataSource = new MatTableDataSource(platforms);
this.dataSource.sort = this.sort;
this.dataSource.sortingDataAccessor = get;
@@ -130,7 +131,6 @@ export class AdminPlatformComponent implements OnInit, OnDestroy {
url: null
}
},
-
height: this.deviceType === 'mobile' ? '97.5vh' : '80vh',
width: this.deviceType === 'mobile' ? '100vw' : '50rem'
});
@@ -170,7 +170,6 @@ export class AdminPlatformComponent implements OnInit, OnDestroy {
url
}
},
-
height: this.deviceType === 'mobile' ? '97.5vh' : '80vh',
width: this.deviceType === 'mobile' ? '100vw' : '50rem'
});
diff --git a/apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-account-platform.component.ts b/apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-account-platform.component.ts
index 55d466a9a6..14d8939005 100644
--- a/apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-account-platform.component.ts
+++ b/apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-account-platform.component.ts
@@ -15,8 +15,8 @@ export class CreateOrUpdatePlatformDialog {
private unsubscribeSubject = new Subject<void>();
public constructor(
- public dialogRef: MatDialogRef<CreateOrUpdatePlatformDialog>,
- @Inject(MAT_DIALOG_DATA) public data: CreateOrUpdatePlatformDialogParams
+ @Inject(MAT_DIALOG_DATA) public data: CreateOrUpdatePlatformDialogParams,
+ public dialogRef: MatDialogRef<CreateOrUpdatePlatformDialog>
) {}
public onCancel() {