This commit is contained in:
Peter Maquiran
2021-08-09 16:48:25 +01:00
parent 1393b4f595
commit ca32bc3808
2 changed files with 20 additions and 34 deletions
@@ -180,11 +180,11 @@ export class NewPublicationPage implements OnInit {
try {
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
this.toastService.successMessage("Publicação criado")
this.toastService.successMessage()
this.goBack();
} catch (error) {
this.toastService.badRequest("Publicação não criado")
this.toastService.badRequest()
} finally {
loader.remove()
}
@@ -207,11 +207,11 @@ export class NewPublicationPage implements OnInit {
try {
console.log(this.publication);
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
this.toastService.successMessage("Publicação criado")
this.toastService.successMessage()
this.goBack();
} catch (error) {
this.toastService.badRequest("Publicação não criado")
this.toastService.badRequest()
} finally {
loader.remove()
}
@@ -235,11 +235,11 @@ export class NewPublicationPage implements OnInit {
try {
await this.publications.UpdatePublication(this.publication.ProcessId, this.publication).toPromise()
this.toastService.successMessage("Publicação criado")
this.toastService.successMessage()
this.goBack();
} catch (error) {
this.toastService.badRequest("Publicação não criado")
this.toastService.badRequest()
} finally {
loader.remove()
}
@@ -266,11 +266,11 @@ export class NewPublicationPage implements OnInit {
try {
console.log(this.publication);
await this.publications.CreatePublication(this.folderId, this.publication).toPromise()
this.toastService.successMessage("Publicação criado")
this.toastService.successMessage()
this.goBackToViewPublications.emit();
} catch (error) {
this.toastService.badRequest("Publicação não criado")
this.toastService.badRequest()
} finally {
loader.remove()
}