integrasi user profil
This commit is contained in:
@@ -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