Skip to content

Commit 59004dd

Browse files
authored
Merge pull request #119 from SoftStackFactory/111-env-userprovider
111 env userprovider
2 parents a30f72e + fca7394 commit 59004dd

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/providers/user/user.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { HttpClient } from '@angular/common/http';
22
import { 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()
1113
export 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
}

0 commit comments

Comments
 (0)