change array of pointer to array of requestjobs

This commit is contained in:
ycc
2025-05-07 20:44:41 +02:00
parent 511e260157
commit 8d589505e5
3 changed files with 9 additions and 8 deletions

View File

@ -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)
}
}
}