Fix multiples API calls and methods

This commit is contained in:
Tiago Kayaya
2020-11-25 11:25:08 +01:00
parent 029d1e3e28
commit d1214e0313
7 changed files with 41 additions and 19 deletions
@@ -27,7 +27,7 @@ export class AttachmentsPage implements OnInit {
loadAttachments(eventid:string)
{
this.attachamentsService.getEventAttachments(eventid).subscribe(attachments => {
this.attachamentsService.getAttachmentsById(eventid).subscribe(attachments => {
this.loadedEventAttachments = attachments;
this.pageId = eventid;
});
@@ -177,6 +177,10 @@ export class EventDetailModalPage implements OnInit {
/* this.attachamentsService.getEventAttachments(this.pageId).subscribe(attachments => {
this.loadedEventAttachments = attachments;
}); */
this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => {
console.log(res);
});
}
async viewDocument(documenturl:string)
{
@@ -186,10 +186,12 @@ export class EventDetailPage implements OnInit {
loadAttachments()
{
console.log(this.pageId);
/* console.log(this.pageId); */
this.attachamentsService.getEventAttachments(this.pageId).subscribe(attachments => {
this.loadedEventAttachments = attachments;
this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => {
this.loadedEventAttachments = res;
console.log(res);
});
}
async viewDocument(documenturl:string)