Fix redirect on war submit
parent
47975b41a3
commit
fe1a058921
|
@ -44,15 +44,13 @@ export class WarSubmitComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
saveWar() {
|
saveWar() {
|
||||||
let file: File;
|
|
||||||
console.log(this.war.date)
|
|
||||||
if (this.fileList) {
|
if (this.fileList) {
|
||||||
file = this.fileList[0];
|
const file: File = this.fileList[0];
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
||||||
this.warService.submitWar(this.war, file)
|
this.warService.submitWar(this.war, file)
|
||||||
.subscribe(war => {
|
.subscribe(war => {
|
||||||
this.router.navigate([war._id], {relativeTo: this.route});
|
this.router.navigate(['../war/' + war._id], {relativeTo: this.route});
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
this.error = error._body.error.message;
|
this.error = error._body.error.message;
|
||||||
|
|
Loading…
Reference in New Issue