From 3a57681bcb5e6f2fbdd5a30ecc00838e3e642e72 Mon Sep 17 00:00:00 2001 From: Joshua Godi Date: Wed, 30 May 2018 09:05:32 -0500 Subject: [PATCH] fix(SetingsService): Put Dashboard entitlements on the correct object --- src/services/SettingService.ts | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/services/SettingService.ts b/src/services/SettingService.ts index c6a1407..3a279e1 100644 --- a/src/services/SettingService.ts +++ b/src/services/SettingService.ts @@ -6,28 +6,28 @@ import { Staffing } from './Staffing'; * A Class that defines a service to grab settings from Bullhorn */ export class SettingService { - http: AxiosInstance; + http: AxiosInstance; - constructor() { - this.http = Staffing.http(); - } + constructor() { + this.http = Staffing.http(); + } - async getSettings(settings: string[]): Promise<{ [key: string]: any }> { - const response: AxiosResponse = await this.http.get(`settings/${settings.join()}`); - return response.data; - } + async getSettings(settings: string[]): Promise<{ [key: string]: any }> { + const response: AxiosResponse = await this.http.get(`settings/${settings.join()}`); + return response.data; + } - async getEntitlements(entity: string): Promise { - const response: AxiosResponse = await this.http.get(`entitlements/${entity}`); - return response.data; - } + async getEntitlements(entity: string): Promise { + const response: AxiosResponse = await this.http.get(`entitlements/${entity}`); + return response.data; + } - async getAllSettingsAndEntitlements(): Promise { - const response: AxiosResponse = await this.http.get('services/Settings/allEntitlementsAndSettings'); - const result: BullhornAllSettingsAndEntitlementsResponse = response.data; - if (result && result.dashboardEntitlements && result.entitlements) { - result.entitlements.DASHBOARD = result.dashboardEntitlements; + async getAllSettingsAndEntitlements(): Promise { + const response: AxiosResponse = await this.http.get('services/Settings/allEntitlementsAndSettings'); + const result: BullhornAllSettingsAndEntitlementsResponse = response.data; + if (result && result.dashboardEntitlements && result.entitlements) { + result.entitlements.Dashboard = result.dashboardEntitlements; + } + return result; } - return result; - } }