Fix Errors caused typo and get information from API

This commit is contained in:
sepehr 2024-07-09 12:55:42 +03:30
parent 9910514714
commit 5e1dc0931c
2 changed files with 3 additions and 3 deletions

View file

@ -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);
}

View file

@ -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;
});
}