mirror of https://github.com/jetkvm/kvm.git
cleanup: remove CheckOnly from UpdateParams
This commit is contained in:
parent
eff4920a06
commit
176b7d2f06
|
|
@ -141,11 +141,6 @@ func (s *State) doUpdate(ctx context.Context, params UpdateParams) error {
|
||||||
return fmt.Errorf("no components to update")
|
return fmt.Errorf("no components to update")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !params.CheckOnly {
|
|
||||||
s.updating = true
|
|
||||||
s.triggerStateUpdate()
|
|
||||||
}
|
|
||||||
|
|
||||||
appUpdate, systemUpdate, err := s.getUpdateStatus(ctx, params)
|
appUpdate, systemUpdate, err := s.getUpdateStatus(ctx, params)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.updating = false
|
s.updating = false
|
||||||
|
|
@ -155,12 +150,6 @@ func (s *State) doUpdate(ctx context.Context, params UpdateParams) error {
|
||||||
s.metadataFetchedAt = time.Now()
|
s.metadataFetchedAt = time.Now()
|
||||||
s.triggerStateUpdate()
|
s.triggerStateUpdate()
|
||||||
|
|
||||||
if params.CheckOnly {
|
|
||||||
s.updating = false
|
|
||||||
s.triggerStateUpdate()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if shouldUpdateApp && appUpdate.available {
|
if shouldUpdateApp && appUpdate.available {
|
||||||
appUpdate.pending = true
|
appUpdate.pending = true
|
||||||
s.triggerComponentUpdateState("app", appUpdate)
|
s.triggerComponentUpdateState("app", appUpdate)
|
||||||
|
|
@ -227,7 +216,6 @@ type UpdateParams struct {
|
||||||
DeviceID string `json:"deviceID"`
|
DeviceID string `json:"deviceID"`
|
||||||
Components map[string]string `json:"components"`
|
Components map[string]string `json:"components"`
|
||||||
IncludePreRelease bool `json:"includePreRelease"`
|
IncludePreRelease bool `json:"includePreRelease"`
|
||||||
CheckOnly bool `json:"checkOnly"`
|
|
||||||
ResetConfig bool `json:"resetConfig"`
|
ResetConfig bool `json:"resetConfig"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue