Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ymao1 committed Nov 18, 2020
1 parent 05331d5 commit 345ac76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions x-pack/plugins/alerts/server/alerts_client/alerts_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,17 @@ export class AlertsClient {

this.validateActions(alertType, data.actions);

const createTime = Date.now();
const { references, actions } = await this.denormalizeActions(data.actions);

const rawAlert: RawAlert = {
...data,
...this.apiKeyAsAlertAttributes(createdAPIKey, username),
actions,
createdBy: username,
updatedBy: username,
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
createdAt: new Date(createTime).toISOString(),
updatedAt: new Date(createTime).toISOString(),
params: validatedAlertTypeParams as RawAlert['params'],
muteAll: false,
mutedInstanceIds: [],
Expand Down

0 comments on commit 345ac76

Please sign in to comment.