Skip to content

Commit

Permalink
Update remaining fetch call tracking to be inline
Browse files Browse the repository at this point in the history
  • Loading branch information
amcclain committed Sep 11, 2024
1 parent 97862e6 commit 06d4838
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
13 changes: 6 additions & 7 deletions admin/tabs/general/alertBanner/AlertBannerModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
7 changes: 4 additions & 3 deletions svc/PrefService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 06d4838

Please sign in to comment.