From 06d4838ddcafd8cff256f1e5f9966eab02da6e0d Mon Sep 17 00:00:00 2001 From: Anselm McClain Date: Wed, 11 Sep 2024 06:41:59 -0700 Subject: [PATCH] Update remaining fetch call tracking to be inline --- admin/tabs/general/alertBanner/AlertBannerModel.ts | 13 ++++++------- svc/PrefService.ts | 7 ++++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/admin/tabs/general/alertBanner/AlertBannerModel.ts b/admin/tabs/general/alertBanner/AlertBannerModel.ts index 9f46a1b49..1ae01fe44 100644 --- a/admin/tabs/general/alertBanner/AlertBannerModel.ts +++ b/admin/tabs/general/alertBanner/AlertBannerModel.ts @@ -191,17 +191,16 @@ export class AlertBannerModel extends HoistModel { async saveBannerSpecAsync(spec: AlertBannerSpec) { const {active, message, intent, iconName, enableClose, clientApps} = spec; try { - await XH.fetchService - .postJson({ - url: 'alertBannerAdmin/setAlertSpec', - body: spec - }) - .track({ + await XH.fetchService.postJson({ + url: 'alertBannerAdmin/setAlertSpec', + body: spec, + track: { category: 'Audit', message: 'Updated Alert Banner', data: {active, message, intent, iconName, enableClose, clientApps}, logData: ['active'] - }); + } + }); } catch (e) { XH.handleException(e); } diff --git a/svc/PrefService.ts b/svc/PrefService.ts index c4ddfb711..6071fc15e 100644 --- a/svc/PrefService.ts +++ b/svc/PrefService.ts @@ -180,10 +180,11 @@ export class PrefService extends HoistService { params: { clientUsername: XH.getUsername(), updates: JSON.stringify(updates) + }, + track: { + message: `Migrated ${updateCount} preferences`, + data: updates } - }).track({ - message: `Migrated ${updateCount} preferences`, - data: updates }); XH.localStorageService.remove(key); }