diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-19 10:05:11 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-19 10:05:11 +0200 |
| commit | ff19af0b5f7518129524401fb8c27492d2634e2f (patch) | |
| tree | 646a640def624f27b36544c8485b3defcb3cb6c3 /state.go | |
| parent | 3f7a95dea59ce05ff9cd620fd51a25dd72b3827b (diff) | |
Server: Give JSON for the configured servers used in the main screen
Diffstat (limited to 'state.go')
| -rw-r--r-- | state.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -32,10 +32,10 @@ type VPNState struct { } func (state *VPNState) GetSavedServers() string { - serversJSON, serversJSONErr := state.Servers.GetJSON() + serversJSON, serversJSONErr := state.Servers.GetServersConfiguredJSON() if serversJSONErr != nil { - return "" + return "{}" } return serversJSON @@ -100,7 +100,9 @@ func (state *VPNState) GoBack() error { return &types.WrappedErrorMessage{Message: errorMessage, Err: fsm.DeregisteredError{}.CustomError()} } - state.FSM.GoBack() + // FIXME: Abitrary back transitions don't work because we need the approriate data + state.FSM.GoTransitionWithData(fsm.NO_SERVER, state.GetSavedServers(), false) + //state.FSM.GoBack() return nil } |
