From 9de780116757fc0025b6bd47b0957af22bf2829b Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期四, 23 十二月 2021 15:35:11 +0800 Subject: [PATCH] fixed: npm run build error --- PAMapp/shared/services/auth.service.ts | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/PAMapp/shared/services/auth.service.ts b/PAMapp/shared/services/auth.service.ts index 6c10d47..e467576 100644 --- a/PAMapp/shared/services/auth.service.ts +++ b/PAMapp/shared/services/auth.service.ts @@ -1,15 +1,13 @@ -import { Role } from "../models/enum/role"; +import { Role } from "../models/enum/Role"; class AuthService { - private idToken = localStorage.getItem('id_token'); - private currentRole = localStorage.getItem('current_role'); isAdminLogin(): boolean { - return this.currentRole === Role.ADMIN; + return localStorage.getItem('current_role') === Role.ADMIN; } isUserLogin(): boolean { - return this.currentRole === Role.USER; + return localStorage.getItem('current_role') === Role.USER; } } -- Gitblit v1.8.0