From 66da3c00e08cbbced8537b47ab8f2cba0da71753 Mon Sep 17 00:00:00 2001 From: Varakh Date: Sun, 24 Dec 2023 00:03:30 +0100 Subject: [PATCH] Fix wrong event type being created for update state change and prepare 1.0.2 release --- CHANGELOG.md | 6 ++++-- server/service_event.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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