File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { HttpClient } from '@angular/common/http' ;
22import { Injectable } from '@angular/core' ;
33
4- /*
4+ import { ENV } from '@app/env' ;
5+
6+ /*
57 Generated class for the UserProvider provider.
68
79 See https://angular.io/guide/dependency-injection for more info on providers
@@ -10,19 +12,19 @@ import { Injectable } from '@angular/core';
1012@Injectable ( )
1113export class UserProvider {
1214
13- regUrl : string = "https://j-reboot-backend.herokuapp.com/api/appUsers"
15+ requestUrl : string = ENV . url
1416
1517 constructor ( public http : HttpClient ) {
1618 console . log ( 'Hello UserProvider Provider' ) ;
1719 }
1820
1921 sendReg ( user ) {
2022 console . log ( 'sendReg() runs' )
21- return this . http . post ( this . regUrl , user )
23+ return this . http . post ( this . requestUrl + 'appUsers' , user )
2224 }
2325
2426
2527 login ( creds ) {
26- return this . http . post ( 'https://reboot-ssf.herokuapp.com/api/ appUsers/login', creds ) ;
28+ return this . http . post ( this . requestUrl + ' appUsers/login', creds ) ;
2729 }
2830}
You can’t perform that action at this time.
0 commit comments