From 5e1dc0931ca8af66d2a047474a2d9fd118a5ef48 Mon Sep 17 00:00:00 2001 From: sepehr Date: Tue, 9 Jul 2024 12:55:42 +0330 Subject: [PATCH] Fix Errors caused typo and get information from API --- .../default-layout/default-header/default-header.component.ts | 2 +- src/app/views/devices/devices.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/containers/default-layout/default-header/default-header.component.ts b/src/app/containers/default-layout/default-header/default-header.component.ts index cd59a84..65443f3 100644 --- a/src/app/containers/default-layout/default-header/default-header.component.ts +++ b/src/app/containers/default-layout/default-header/default-header.component.ts @@ -35,7 +35,7 @@ export class DefaultHeaderComponent extends HeaderComponent { ) { super(); var _self = this; - var session_info: string = localStorage.getItem('current_user') || "[]]"; + var session_info: string = localStorage.getItem('current_user') || "[]"; this.current_user = JSON.parse(session_info); } diff --git a/src/app/views/devices/devices.component.ts b/src/app/views/devices/devices.component.ts index f7d395a..e27529f 100644 --- a/src/app/views/devices/devices.component.ts +++ b/src/app/views/devices/devices.component.ts @@ -402,9 +402,9 @@ export class DevicesComponent implements OnInit, OnDestroy { var _self = this; this.data_provider.get_devgroup_list().then((res) => { if( "status" in res && res.status == 'failed' ) - _self.groups=false + _self.groups = false else - _self.groups = res.data; + _self.groups = res; }); }