mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -14,7 +14,7 @@ export class AttachmentsService {
|
||||
loggeduser: User;
|
||||
headers: HttpHeaders;
|
||||
|
||||
constructor(private http: HttpClient, user: AuthService) {
|
||||
constructor(private http: HttpClient, user: AuthService) {
|
||||
this.loggeduser = user.ValidatedUser;
|
||||
this.headers = new HttpHeaders();
|
||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
@@ -26,9 +26,9 @@ export class AttachmentsService {
|
||||
|
||||
params = params.set("SerialNumber", serialNumber);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
return this.http.get<Attachment[]>(`${geturl}`, options);
|
||||
}
|
||||
@@ -39,10 +39,10 @@ export class AttachmentsService {
|
||||
|
||||
params = params.set("Source", source.toString());
|
||||
/* params = params.set("SourceId", sourceid); */
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.get<Attachment[]>(`${geturl}`, options);
|
||||
@@ -54,37 +54,35 @@ export class AttachmentsService {
|
||||
|
||||
params = params.set("ParentId", eventId);
|
||||
/* params = params.set("SourceId", sourceid); */
|
||||
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.get<Attachment[]>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
setEventAttachmentById(body: EventAttachment) {
|
||||
setEventAttachmentById(body: any) {
|
||||
|
||||
let geturl = environment.apiURL + 'Attachments/Create';
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
}
|
||||
|
||||
return this.http.post(`${geturl}`, body, options);
|
||||
}
|
||||
|
||||
deleteEventAttachmentById(attachmentId) {
|
||||
|
||||
deleteEventAttachmentById(attachmentId) {
|
||||
|
||||
let geturl = environment.apiURL + `Attachments/Delete?attachmentId=${attachmentId}`;
|
||||
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("attachmentId", attachmentId);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
}
|
||||
|
||||
return this.http.delete(`${geturl}`, options);
|
||||
|
||||
Reference in New Issue
Block a user