diff --git a/CHANGELOG.md b/CHANGELOG.md index ca6b521..6db5e8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,9 @@ Changes adhere to [semantic versioning](https://semver.org). -## [1.0.2] - UNRELEASED +## [1.0.2] - 2023/12/23 -* ... +* Fix wrong event type being created for update state change ## [1.0.1] - 2023/12/23 @@ -20,6 +20,8 @@ Changes adhere to [semantic versioning](https://semver.org). * Initial release +[1.0.2]: https://git.myservermanager.com/varakh/upda/releases/tag/1.0.2 + [1.0.1]: https://git.myservermanager.com/varakh/upda/releases/tag/1.0.1 [1.0.0]: https://git.myservermanager.com/varakh/upda/releases/tag/1.0.0 \ No newline at end of file diff --git a/server/service_event.go b/server/service_event.go index 31d2833..675fc9d 100644 --- a/server/service_event.go +++ b/server/service_event.go @@ -43,7 +43,7 @@ func (s *eventService) createUpdateUpdated(old *Update, new *Update) *Event { if old.State == new.State { eventName = api.EventNameUpdateUpdated } else { - switch old.State { + switch new.State { case api.UpdateStatePending.Value(): eventName = api.EventNameUpdateUpdatedPending break