improve profile reactiveness and action page performance

This commit is contained in:
Peter Maquiran
2024-07-24 13:37:02 +01:00
parent 717968ac52
commit 46bb078dd2
45 changed files with 543 additions and 247 deletions
@@ -0,0 +1,39 @@
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';
@Injectable({
providedIn: 'root'
})
export class UserRemoteRepositoryService {
constructor(
private httpService: HttpService
) { }
getUserProfilePhoto(guid: string) {
const geturl = environment.apiURL + 'UserAuthentication/GetPhoto';
const params = {
UserPhoto: guid
}
return this.httpService.get<string>(`${geturl}`, params);
}
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<string>(`${geturl}`, data, options);
}
}