Skip to content

Commit

Permalink
Add API url to post method
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramin A committed May 21, 2020
1 parent 59569e7 commit 84f2bd7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .angulardoc.json
@@ -0,0 +1,4 @@
{
"repoId": "7adc7b67-8c1e-4692-8f52-170811e3e69f",
"lastSync": 0
}
4 changes: 2 additions & 2 deletions src/app/details-form/details-form.component.ts
Expand Up @@ -29,10 +29,10 @@ export class DetailsFormComponent implements OnInit {
this.dataService
.postUserDetails(this.person)
.subscribe(person => {
console.log('postUserDetails has been successful:' + person)
console.log('postUserDetails has been successful:', person)
});
error => {
console.log ('postUserDetails post failed: '+ error)
console.log ('postUserDetails post failed: ', error)
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/app/services/data.service.ts
Expand Up @@ -13,7 +13,7 @@ export class DataService {
constructor(private http: HttpClient) { }

postUserDetails(person: Person): Observable<Person>{
// return this.http.post<Person>('ApiUrl', person)
return of(person)
return this.http.post<Person>('https://putsreq.com/aEJaJyGeFRl7vzOj00sb', person)
//return of(person)
}
}

0 comments on commit 84f2bd7

Please sign in to comment.