fixed some bug change get by id to get by product code

This commit is contained in:
Kenta420 2023-10-05 10:15:12 +07:00
parent 7450796a6b
commit d5cfdf496f
5 changed files with 30 additions and 29 deletions

View file

@ -14,8 +14,8 @@ import { environment } from 'src/environments/environment';
@Injectable({ providedIn: 'root' })
export class UserService {
private currnetUserSubject = new BehaviorSubject<User | null>(null);
public currentUser = this.currnetUserSubject
private currentUserSubject = new BehaviorSubject<User | null>(null);
public currentUser = this.currentUserSubject
.asObservable()
.pipe(distinctUntilChanged());
@ -54,10 +54,10 @@ export class UserService {
}
setAuth(user: User): void {
void this.currnetUserSubject.next(user);
void this.currentUserSubject.next(user);
}
purgeAuth(): void {
void this.currnetUserSubject.next(null);
void this.currentUserSubject.next(null);
}
}