slicing dashboard
This commit is contained in:
@@ -71,7 +71,7 @@ export class DeviceService {
|
||||
|
||||
deviceSwitch(data): Observable<any> {
|
||||
const endpoint = `/devices`;
|
||||
const url = `${BASE_URL}${endpoint}/device-switch`;
|
||||
const url = `${BASE_URL}${endpoint}/device-command`;
|
||||
const headers = new HttpHeaders({
|
||||
"Content-Type": "application/json",
|
||||
"x-api-key": "j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
import { HttpClient, HttpHeaders } from "@angular/common/http";
|
||||
import { Observable } from "rxjs";
|
||||
import { BehaviorSubject, Observable } from "rxjs";
|
||||
import { jwtDecode } from "jwt-decode";
|
||||
import { Router } from "@angular/router";
|
||||
import { AuthService } from "src/app/_services/auth.service";
|
||||
@@ -23,12 +23,17 @@ interface CustomJwtPayload {
|
||||
})
|
||||
export class LoginService {
|
||||
private readonly tokenKey = "currentUser";
|
||||
private tabSelected = new BehaviorSubject(null);
|
||||
public _tabSelected = this.tabSelected.asObservable();
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private router: Router,
|
||||
public logoutService: AuthService
|
||||
) {}
|
||||
|
||||
setTabsSelected(e: string){
|
||||
this.tabSelected.next(e);
|
||||
}
|
||||
updatePassword(data: any): Observable<any> {
|
||||
const endpoint = `/users`;
|
||||
const url = `${BASE_URL}${endpoint}/reset-password`;
|
||||
|
||||
Reference in New Issue
Block a user