change array of pointer to array of requestjobs
This commit is contained in:
@ -276,7 +276,7 @@ func (id *Identity) generateRandomHiddenStuff() {
|
||||
type BackgroundJob struct {
|
||||
RootPublic string `json:"root_public,omitempty"`
|
||||
Device meowlib.KeyPair `json:"device,omitempty"`
|
||||
Jobs []*RequestsJob `json:"jobs,omitempty"`
|
||||
Jobs []RequestsJob `json:"jobs,omitempty"`
|
||||
}
|
||||
|
||||
type RequestsJob struct {
|
||||
@ -284,8 +284,8 @@ type RequestsJob struct {
|
||||
LookupKeys []meowlib.KeyPair `json:"lookup_keys,omitempty"`
|
||||
}
|
||||
|
||||
func (id *Identity) GetRequestJobs() []*RequestsJob {
|
||||
var list []*RequestsJob
|
||||
func (id *Identity) GetRequestJobs() []RequestsJob {
|
||||
var list []RequestsJob
|
||||
srvs := map[string]*RequestsJob{}
|
||||
// get all servers
|
||||
servers, err := id.MessageServers.LoadAllServers()
|
||||
@ -320,7 +320,7 @@ func (id *Identity) GetRequestJobs() []*RequestsJob {
|
||||
// build list
|
||||
for _, srv := range srvs {
|
||||
if len(srv.LookupKeys) > 0 {
|
||||
list = append(list, srv)
|
||||
list = append(list, *srv)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user