diff options
Diffstat (limited to 'portal-FE-common/src/app/shared/services/userbar/userbar.service.ts')
-rw-r--r-- | portal-FE-common/src/app/shared/services/userbar/userbar.service.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/portal-FE-common/src/app/shared/services/userbar/userbar.service.ts b/portal-FE-common/src/app/shared/services/userbar/userbar.service.ts new file mode 100644 index 00000000..de42ce36 --- /dev/null +++ b/portal-FE-common/src/app/shared/services/userbar/userbar.service.ts @@ -0,0 +1,33 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { environment } from 'src/environments/environment'; + +@Injectable({ + providedIn: 'root' +}) +export class UserbarService { + refreshCount: number; + maxCount: number; + apiUrl = environment.api; + constructor(public http: HttpClient) { + this.refreshCount = 0; + this.maxCount = 0; + } + + getRefreshCount() { + return this.refreshCount; + } + setRefreshCount(count) { + this.refreshCount = count; + } + setMaxRefreshCount(count) { + this.maxCount = count; + } + decrementRefreshCount() { + this.refreshCount = this.refreshCount - 1; + } + + getOnlineUserUpdateRate(){ + return this.http.get(this.apiUrl.onlineUserUpdateRate); + } +} |