Fix redirect on war submit
parent
47975b41a3
commit
fe1a058921
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue