diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-03-12 16:29:39 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-03-12 16:29:39 +0100 |
| commit | e604b1e1424edff72f4f0e7f447e66ffee850110 (patch) | |
| tree | 577978b86fb7afa71e147eee22b42d4897229fec | |
| parent | be1919723e8e5d5381934945077e0af53dbffa23 (diff) | |
Profiles + Server: Also expose default gateway settings in profile
| -rw-r--r-- | CHANGES.md | 3 | ||||
| -rw-r--r-- | internal/api/profiles/profiles.go | 1 | ||||
| -rw-r--r-- | types/server/server.go | 3 |
3 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,6 @@ +# Not released +* Expose default gateway in profile settings too. For clients, use the default gateway set on the config object, this is maybe only useful for suggesting some profiles in the client profile chooser UI + # 1.99.1 (2024-03-11) * Disable type annotation for global eduVPN class as it gave a `SyntaxError` on some Python versions. See https://bugs.python.org/issue34939 diff --git a/internal/api/profiles/profiles.go b/internal/api/profiles/profiles.go index d31bbcc..1df17e3 100644 --- a/internal/api/profiles/profiles.go +++ b/internal/api/profiles/profiles.go @@ -123,6 +123,7 @@ func (i Info) Public() server.Profiles { DisplayName: map[string]string{ "en": p.DisplayName, }, + DefaultGateway: p.DefaultGateway, } } return server.Profiles{Map: m} diff --git a/types/server/server.go b/types/server/server.go index 260d328..1d55ea7 100644 --- a/types/server/server.go +++ b/types/server/server.go @@ -86,6 +86,9 @@ type Profile struct { // E.g. {"en": "Default Profile"} // If this is empty, the field is omitted from the JSON DisplayName map[string]string `json:"display_name,omitempty"` + + // DefaultGateway is true when the profile is a default gateway one + DefaultGateway bool `json:"default_gateway"` } // Profiles is the map of profiles with the current defined |
