mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
Fix multiples API calls and methods
This commit is contained in:
@@ -20,11 +20,11 @@ export class AttachmentsService {
|
||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
}
|
||||
|
||||
getEventAttachments(eventid: string): Observable<Attachment[]>{
|
||||
getAttachmentsBySerial(serialNumber: string): Observable<Attachment[]>{
|
||||
let geturl = environment.apiURL + 'attachments/GetAttachments';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("ParentId", eventid);
|
||||
params = params.set("SerialNumber", serialNumber);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
@@ -45,6 +45,20 @@ export class AttachmentsService {
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.get<Attachment[]>(`${geturl}`, options);
|
||||
}
|
||||
getAttachmentsById(eventId: string): Observable<Attachment[]>{
|
||||
let geturl = environment.apiURL + 'attachments/GetAttachmentsByEventId';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("ParentId", eventId);
|
||||
/* params = params.set("SourceId", sourceid); */
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.get<Attachment[]>(`${geturl}`, options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user