mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
|
|
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);
|
||
|
|
}
|
||
|
|
}
|