Add check for app update (#88)

* add check for app update; fix ETUI error handling

* validate user args
This commit is contained in:
Alex Goodman
2020-07-21 12:02:03 -04:00
committed by GitHub
parent 380cd39514
commit 7ebb9f4e0b
19 changed files with 438 additions and 66 deletions
+13
View File
@@ -59,3 +59,16 @@ func ParseCatalogerFinished(e partybus.Event) (presenter.Presenter, error) {
return pres, nil
}
func ParseAppUpdateAvailable(e partybus.Event) (string, error) {
if err := checkEventType(e.Type, event.AppUpdateAvailable); err != nil {
return "", err
}
newVersion, ok := e.Value.(string)
if !ok {
return "", newPayloadErr(e.Type, "Value", e.Value)
}
return newVersion, nil
}