Skip to content

Commit

Permalink
Merge pull request #194 from xuzhu-591/fix-event
Browse files Browse the repository at this point in the history
fix: webhook event for app update
  • Loading branch information
xuzhu-591 authored Sep 19, 2023
2 parents fcabfc0 + 9cd6aac commit 665168f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/controller/application/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,16 @@ func (c *controller) UpdateApplicationV2(ctx context.Context, id uint,
}
}

// 6. record event
if _, err := c.eventMgr.CreateEvent(ctx, &eventmodels.Event{
EventSummary: eventmodels.EventSummary{
ResourceType: common.ResourceApplication,
EventType: eventmodels.ApplicationUpdated,
ResourceID: appExistsInDB.ID,
},
}); err != nil {
log.Warningf(ctx, "failed to create event, err: %s", err.Error())
}
return err
}

Expand Down

0 comments on commit 665168f

Please sign in to comment.