diff options
Diffstat (limited to 'internal/api')
| -rw-r--r-- | internal/api/api_test.go | 2 | ||||
| -rw-r--r-- | internal/api/profiles/profiles.go | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/internal/api/api_test.go b/internal/api/api_test.go index 1f70b20..5034465 100644 --- a/internal/api/api_test.go +++ b/internal/api/api_test.go @@ -274,6 +274,7 @@ func TestAPIInfo(t *testing.T) { "default_gateway": false, "display_name": "test profile 1", "profile_id": "test1", + "profile_priority": 3, "vpn_proto_list": [ "openvpn", "wireguard" @@ -291,6 +292,7 @@ func TestAPIInfo(t *testing.T) { ID: "test1", DisplayName: "test profile 1", VPNProtoList: []string{"openvpn", "wireguard"}, + Priority: 3, DefaultGateway: false, }, }, diff --git a/internal/api/profiles/profiles.go b/internal/api/profiles/profiles.go index 9f51064..e835ffe 100644 --- a/internal/api/profiles/profiles.go +++ b/internal/api/profiles/profiles.go @@ -26,6 +26,9 @@ type Profile struct { // This is provided for a Linux client issue // See: https://github.com/eduvpn/python-eduvpn-client/issues/550 DNSSearchDomains []string `json:"dns_search_domain_list"` + // Priority is the priority of the profile for sorting in the UI + // the higher the priority, the higher it should be in the list + Priority int `json:"profile_priority"` } // ListInfo is the struct that has the profile list @@ -109,6 +112,7 @@ func (i Info) Public() server.Profiles { "en": p.DisplayName, }, DefaultGateway: p.DefaultGateway, + Priority: p.Priority, } } return server.Profiles{Map: m} |
