diff --git a/src/routes/identity.go b/src/routes/identity.go index ce134fb..75224ed 100644 --- a/src/routes/identity.go +++ b/src/routes/identity.go @@ -113,7 +113,8 @@ func (s *identity) get(w http.ResponseWriter, r *http.Request) { for i := range entity.Proofs { q.Run(ProofKey(entity.Proofs[i]), func(q promise.Q) { - proof := NewProof(entity.Proofs[i]) + key := q.Key().(ProofKey) + proof := NewProof(string(key)) q.Resolve(proof) }) @@ -153,11 +154,14 @@ func (s *identity) get(w http.ResponseWriter, r *http.Request) { gotProofs = true if len(page.Entity.Proofs) > 0 { proofs := make(Proofs, len(page.Entity.Proofs)) - for _, p := range page.Entity.Proofs { + for i := range page.Entity.Proofs { + p := page.Entity.Proofs[i] + proofs[p] = NewProof(p) if s, ok := s.cache.Get(ProofKey(p)); ok { proofs[p] = s.Value().(*Proof) } else { + log.Info("Missing proof", p) gotProofs = false } }