Skip to content

Commit

Permalink
enabled field
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Dec 9, 2021
1 parent 12780d8 commit d976675
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x-pack/plugins/reporting/server/saved_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { PLUGIN_ID } from '../../common/constants';

interface ReportingStatusSavedObjectAttributes {
lastReported: string;
enabled: true;
}

const SAVED_OBJECT_ID = 'reporting-status';
Expand All @@ -24,12 +25,16 @@ export const reportingStatusSavedObjectType: SavedObjectsType<ReportingStatusSav
lastReported: {
type: 'date',
},
enabled: {
type: 'boolean',
},
},
},
};

export async function updateLastReported(savedObjects: SavedObjectsServiceStart) {
const reportingStatus: ReportingStatusSavedObjectAttributes = {
enabled: true,
lastReported: new Date().toISOString(),
};

Expand Down

0 comments on commit d976675

Please sign in to comment.