create() should return Hero model. (#3414)

This commit is contained in:
Brad Christie 2017-03-23 19:04:42 -04:00 committed by Ward Bell
parent a083fdbe8b
commit d65f1943e3
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ export class HeroService {
return this.http return this.http
.post(this.heroesUrl, JSON.stringify({name: name}), {headers: this.headers}) .post(this.heroesUrl, JSON.stringify({name: name}), {headers: this.headers})
.toPromise() .toPromise()
.then(res => res.json().data) .then(res => res.json().data as Hero)
.catch(this.handleError); .catch(this.handleError);
} }
// #enddocregion create // #enddocregion create