aboutsummaryrefslogtreecommitdiff
path: root/src/app/components/admin-panel-page/admin-panel-page.component.ts
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-02-25 14:38:12 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-02-25 14:38:12 +0200
commiteab7b2108d91af1c905f795febf811d5cc404863 (patch)
tree968c641667d60532c0dbc97bd13d3284f3bbcdc6 /src/app/components/admin-panel-page/admin-panel-page.component.ts
parenta7bf5cad6bf66f2cd7e12fc436410fafb7826b10 (diff)
downloadDevHive-Angular-eab7b2108d91af1c905f795febf811d5cc404863.tar
DevHive-Angular-eab7b2108d91af1c905f795febf811d5cc404863.tar.gz
DevHive-Angular-eab7b2108d91af1c905f795febf811d5cc404863.zip
Removed unnecessary variables from request subscriptions
Diffstat (limited to 'src/app/components/admin-panel-page/admin-panel-page.component.ts')
-rw-r--r--src/app/components/admin-panel-page/admin-panel-page.component.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/app/components/admin-panel-page/admin-panel-page.component.ts b/src/app/components/admin-panel-page/admin-panel-page.component.ts
index 99c0721..95d69d3 100644
--- a/src/app/components/admin-panel-page/admin-panel-page.component.ts
+++ b/src/app/components/admin-panel-page/admin-panel-page.component.ts
@@ -53,7 +53,7 @@ export class AdminPanelPageComponent implements OnInit {
this._router.navigate(['/login']);
}
},
- (err: HttpErrorResponse) => {
+ () => {
this._router.navigate(['/login']);
}
);
@@ -129,7 +129,7 @@ export class AdminPanelPageComponent implements OnInit {
if (languageCreate !== '' && languageCreate !== null) {
this._languageService.createLanguageWithSessionStorageRequest(languageCreate.trim()).subscribe(
- (result: object) => {
+ () => {
this.languageModifiedSuccess('Successfully updated languages!');
},
(err: HttpErrorResponse) => {
@@ -147,7 +147,7 @@ export class AdminPanelPageComponent implements OnInit {
const langId = this.availableLanguages.filter(x => x.name === updateLanguageOldName.trim())[0].id;
this._languageService.putLanguageWithSessionStorageRequest(langId, updateLanguageNewName.trim()).subscribe(
- (result: object) => {
+ () => {
this.languageModifiedSuccess('Successfully updated languages!');
},
(err: HttpErrorResponse) => {
@@ -164,7 +164,7 @@ export class AdminPanelPageComponent implements OnInit {
const langId = this.availableLanguages.filter(x => x.name === deleteLanguageName.trim())[0].id;
this._languageService.deleteLanguageWithSessionStorageRequest(langId).subscribe(
- (result: object) => {
+ () => {
this.languageModifiedSuccess('Successfully deleted language!');
},
(err: HttpErrorResponse) => {
@@ -205,7 +205,7 @@ export class AdminPanelPageComponent implements OnInit {
if (technologyCreate !== '' && technologyCreate !== null) {
this._technologyService.createTechnologyWithSessionStorageRequest(technologyCreate.trim()).subscribe(
- (result: object) => {
+ () => {
this.technologyModifiedSuccess('Successfully updated technologies!');
},
(err: HttpErrorResponse) => {
@@ -223,7 +223,7 @@ export class AdminPanelPageComponent implements OnInit {
const techId = this.availableTechnologies.filter(x => x.name === updateTechnologyOldName.trim())[0].id;
this._technologyService.putTechnologyWithSessionStorageRequest(techId, updateTechnologyNewName.trim()).subscribe(
- (result: object) => {
+ () => {
this.technologyModifiedSuccess('Successfully updated technologies!');
},
(err: HttpErrorResponse) => {
@@ -240,7 +240,7 @@ export class AdminPanelPageComponent implements OnInit {
const techId = this.availableTechnologies.filter(x => x.name === deleteTechnologyName.trim())[0].id;
this._technologyService.deleteTechnologyWithSessionStorageRequest(techId).subscribe(
- (result: object) => {
+ () => {
this.technologyModifiedSuccess('Successfully deleted technology!');
},
(err: HttpErrorResponse) => {
@@ -283,7 +283,7 @@ export class AdminPanelPageComponent implements OnInit {
const userId: Guid = Guid.parse(deleteUser);
this._userService.deleteUserRequest(userId, this._tokenService.getTokenFromSessionStorage()).subscribe(
- (result: object) => {
+ () => {
this.deletionSuccess('Successfully deleted user!');
},
(err: HttpErrorResponse) => {
@@ -300,7 +300,7 @@ export class AdminPanelPageComponent implements OnInit {
const postId: Guid = Guid.parse(deletePost);
this._postService.deletePostRequest(postId, this._tokenService.getTokenFromSessionStorage()).subscribe(
- (result: object) => {
+ () => {
this.deletionSuccess('Successfully deleted user!');
},
(err: HttpErrorResponse) => {
@@ -317,7 +317,7 @@ export class AdminPanelPageComponent implements OnInit {
const commentId: Guid = Guid.parse(deleteComment);
this._commentService.deleteCommentWithSessionStorage(commentId).subscribe(
- (result: object) => {
+ () => {
this.deletionSuccess('Successfully deleted comment!');
},
(err: HttpErrorResponse) => {