From eab7b2108d91af1c905f795febf811d5cc404863 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 25 Feb 2021 14:38:12 +0200 Subject: Removed unnecessary variables from request subscriptions --- src/app/components/comment-page/comment-page.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/app/components/comment-page/comment-page.component.ts') diff --git a/src/app/components/comment-page/comment-page.component.ts b/src/app/components/comment-page/comment-page.component.ts index 045e8ea..413436e 100644 --- a/src/app/components/comment-page/comment-page.component.ts +++ b/src/app/components/comment-page/comment-page.component.ts @@ -1,4 +1,3 @@ -import { HttpErrorResponse } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { Title } from '@angular/platform-browser'; @@ -42,7 +41,7 @@ export class CommentPageComponent implements OnInit { } this.loaded = true; }, - (err: HttpErrorResponse) => { + () => { this._router.navigate(['/not-found']); } ); @@ -68,7 +67,7 @@ export class CommentPageComponent implements OnInit { if (newMessage !== '' && newMessage !== this.comment.message) { console.log(this.commentId); this._commentService.putCommentWithSessionStorageRequest(this.commentId, this.comment.postId, newMessage).subscribe( - (result: object) => { + () => { this.reloadPage(); } ); @@ -79,7 +78,7 @@ export class CommentPageComponent implements OnInit { deleteComment(): void { this._commentService.deleteCommentWithSessionStorage(this.commentId).subscribe( - (result: object) => { + () => { this.toPost(); } ); -- cgit v1.2.3