integrasi user profil
This commit is contained in:
1 parent
5913980330
commit
ae74cf2332
3 files changed
+95
-18
No files matched your search
@@ -19,4 +19,25 @@ export class LoginService {
|
||||
});
|
||||
return this.http.put<any>(url, data, { headers });
|
||||
}
|
||||
|
||||
getDataProfil(id): Observable<any> {
|
||||
const endpoint = `/users`;
|
||||
const url = `${BASE_URL}${endpoint}/byUserid/${id}`;
|
||||
const headers = new HttpHeaders({
|
||||
"Content-Type": "application/json",
|
||||
"x-api-key": "j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT",
|
||||
});
|
||||
return this.http.get<any>(url, { headers });
|
||||
}
|
||||
|
||||
updateProfile(data: any, userId: string): Observable<any> {
|
||||
const endpoint = `/users`;
|
||||
const url = `${BASE_URL}${endpoint}/update/${userId}`;
|
||||
const headers = new HttpHeaders({
|
||||
"x-api-key": "j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT",
|
||||
});
|
||||
|
||||
return this.http.post(`${url}`, data, { headers });
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user