This commit is contained in:
2018-04-22 21:30:29 -04:00
parent 3d263a956d
commit 914118f52f
15 changed files with 289 additions and 36 deletions

View File

@@ -0,0 +1,36 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
@Injectable()
export class RegistrationService {
APIURL = "http://192.241.155.78/ludosdata/api.php";
constructor(
private http: HttpClient
){ }
/*
validateUserName( userName ): Observable<any> {
return this.http.get( "http://www.pugludos.com/registration.php?key=validation&type=username&value=" + userName )
.map(res => {
return(
res
);
});
}
*/
validateUserName( userName ): Observable<any> {
return this.http.get( this.APIURL + "/users?filter=email,cs," + userName + "&transform=1" )
.map(res => {
return(
res
);
});
}
}