diff --git a/packages/bridge-server/data/data.db b/packages/bridge-server/data/data.db index 1cbd428..b283cc6 100644 Binary files a/packages/bridge-server/data/data.db and b/packages/bridge-server/data/data.db differ diff --git a/packages/bridge-ui/src/app/components/new-season-dialog/new-season-dialog.component.ts b/packages/bridge-ui/src/app/components/new-season-dialog/new-season-dialog.component.ts index e0f89cc..8b5e59f 100644 --- a/packages/bridge-ui/src/app/components/new-season-dialog/new-season-dialog.component.ts +++ b/packages/bridge-ui/src/app/components/new-season-dialog/new-season-dialog.component.ts @@ -65,8 +65,12 @@ export class NewSeasonDialogComponent { submit(): void { let title = this.title.value != undefined ? this.title.value : ""; let subTitle = this.subTitle.value != undefined ? this.subTitle.value : ""; - let startingDate = this.startingDate.value != undefined ? this.startingDate.value : new Date(Date.now()); + let startingDate = this.startingDate.value != undefined ? this.startingDate.value : ""; - //this.seasonsService.create(); + let _date = new Date(startingDate); + + this.seasonsService.create(title, subTitle, _date).subscribe(data => { + console.log(data); + }); } } diff --git a/packages/bridge-ui/src/app/services/seasons.service.ts b/packages/bridge-ui/src/app/services/seasons.service.ts index 60ecf91..7129dd9 100644 --- a/packages/bridge-ui/src/app/services/seasons.service.ts +++ b/packages/bridge-ui/src/app/services/seasons.service.ts @@ -31,4 +31,8 @@ export class SeasonsService { }); return from(promise); } + + create(title: string, subTitle: string, startingDate: Date) { + return this.httpClient.post("http://localhost:3000/seasons/", {title, subTitle, startingDate}); + } }