import { Injectable } from '@angular/core'; 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' }) export class UserRemoteRepositoryService { constructor( private httpService: HttpService ) { } getUserProfilePhoto(guid: string, tracing?: TracingType) { const geturl = environment.apiURL + 'UserAuthentication/GetPhoto'; const params = { UserPhoto: guid } return this.httpService.get(`${geturl}`, params, tracing); } addUserProfilePhoto(data: IProfilePictureInputDTO) { const geturl = environment.apiURL + 'UserAuthentication/AddPhoto'; let http = new HttpHeaders(); http = http.set('content-type', "application/json"); http = http.set('accept', "application/json"); let options = { headers: http }; return this.httpService.post(`${geturl}`, data, options); } }