Pull request: all: fix names of runtime clients on query log page

Updates #2929.

Squashed commit of the following:

commit f02111aac1e9d63732589b65b224613aa3240677
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Apr 7 17:40:16 2021 +0300

    all: fix names of runtime clients on query log page
This commit is contained in:
Ainar Garipov
2021-04-07 17:49:37 +03:00
parent c133b01ef7
commit 908452f883
4 changed files with 2 additions and 14 deletions

View File

@@ -3,10 +3,9 @@ package querylog
// Client is the information required by the query log to match against clients
// during searches.
type Client struct {
Whois *ClientWhois `json:"whois,omitempty"`
Name string `json:"name"`
DisallowedRule string `json:"disallowed_rule"`
Whois *ClientWhois `json:"whois,omitempty"`
IDs []string `json:"ids"`
Disallowed bool `json:"disallowed"`
}

View File

@@ -16,7 +16,6 @@ func TestQueryLog_Search_findClient(t *testing.T) {
const unknownClientID = "client-2"
knownClient := &Client{
IDs: []string{knownClientID},
Name: knownClientName,
}
@@ -91,5 +90,4 @@ func TestQueryLog_Search_findClient(t *testing.T) {
require.NotNil(t, gotClient)
assert.Equal(t, knownClientName, gotClient.Name)
assert.Equal(t, []string{knownClientID}, gotClient.IDs)
}