Fix redirect on war submit

pull/6/head
Florian Hartwich 2017-08-06 11:55:34 +02:00
parent 47975b41a3
commit fe1a058921
1 changed files with 2 additions and 4 deletions

View File

@ -44,15 +44,13 @@ export class WarSubmitComponent {
}
saveWar() {
let file: File;
console.log(this.war.date)
if (this.fileList) {
file = this.fileList[0];
const file: File = this.fileList[0];
this.loading = true;
this.warService.submitWar(this.war, file)
.subscribe(war => {
this.router.navigate([war._id], {relativeTo: this.route});
this.router.navigate(['../war/' + war._id], {relativeTo: this.route});
},
error => {
this.error = error._body.error.message;