mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
add tracing tags
This commit is contained in:
@@ -3,6 +3,7 @@ import { HttpService } from 'src/app/services/http.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { IProfilePictureInputDTO } from '../dto/profilePictureInputDTO';
|
||||
import { HttpHeaders } from '@angular/common/http';
|
||||
import { TracingType } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -13,14 +14,14 @@ export class UserRemoteRepositoryService {
|
||||
private httpService: HttpService
|
||||
) { }
|
||||
|
||||
getUserProfilePhoto(guid: string) {
|
||||
getUserProfilePhoto(guid: string, tracing?: TracingType) {
|
||||
const geturl = environment.apiURL + 'UserAuthentication/GetPhoto';
|
||||
|
||||
|
||||
const params = {
|
||||
UserPhoto: guid
|
||||
}
|
||||
|
||||
return this.httpService.get<string>(`${geturl}`, params);
|
||||
return this.httpService.get<string>(`${geturl}`, params, tracing);
|
||||
}
|
||||
|
||||
addUserProfilePhoto(data: IProfilePictureInputDTO) {
|
||||
@@ -33,7 +34,7 @@ export class UserRemoteRepositoryService {
|
||||
let options = {
|
||||
headers: http
|
||||
};
|
||||
|
||||
|
||||
return this.httpService.post<string>(`${geturl}`, data, options);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ export class UserRepositoryService {
|
||||
) { }
|
||||
|
||||
async getUserProfilePhoto(guid: string , tracing?: TracingType) {
|
||||
const result = await this.remote.getUserProfilePhoto(guid)
|
||||
const result = await this.remote.getUserProfilePhoto(guid, tracing)
|
||||
|
||||
if(result.isOk()) {
|
||||
this.local.addProfilePicture({base64: 'data:image/jpeg;base64,' + result.value})
|
||||
|
||||
Reference in New Issue
Block a user