|
|
@ -92,7 +92,6 @@ export class FeedComponent implements OnInit {
|
|
|
|
} else if (postElement) {
|
|
|
|
} else if (postElement) {
|
|
|
|
this.posting = true;
|
|
|
|
this.posting = true;
|
|
|
|
this.feedService.createPost(postElement.value, this.file).subscribe((result) => {
|
|
|
|
this.feedService.createPost(postElement.value, this.file).subscribe((result) => {
|
|
|
|
console.log('response in component');
|
|
|
|
|
|
|
|
this.posting = false;
|
|
|
|
this.posting = false;
|
|
|
|
postElement.value = '';
|
|
|
|
postElement.value = '';
|
|
|
|
this.textInputValue = '';
|
|
|
|
this.textInputValue = '';
|
|
|
@ -104,7 +103,6 @@ export class FeedComponent implements OnInit {
|
|
|
|
this.showNew();
|
|
|
|
this.showNew();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, (error: IErrorResponse) => {
|
|
|
|
}, (error: IErrorResponse) => {
|
|
|
|
console.log('an error occured in component');
|
|
|
|
|
|
|
|
console.log(error);
|
|
|
|
console.log(error);
|
|
|
|
this.posting = false;
|
|
|
|
this.posting = false;
|
|
|
|
this.errorOccurred = true;
|
|
|
|
this.errorOccurred = true;
|
|
|
|