Load record names in getRecordsByIds
GQL query (#67)
* Fix variable rename * Load names in getRecordsByIds GQL query
This commit is contained in:
parent
c5cfc35f48
commit
edeeb49614
@ -33,7 +33,7 @@ func PlaygroundHandler(apiURL string) http.HandlerFunc {
|
|||||||
}
|
}
|
||||||
w.Header().Set("Content-Type", "text/html")
|
w.Header().Set("Content-Type", "text/html")
|
||||||
err := page.Execute(w, map[string]interface{}{
|
err := page.Execute(w, map[string]interface{}{
|
||||||
"apiUrl": apiURL,
|
"apiURL": apiURL,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
@ -107,7 +107,7 @@ func (k Keeper) GetRecord(ctx sdk.Context, id string) (record types.Record) {
|
|||||||
store := ctx.KVStore(k.storeKey)
|
store := ctx.KVStore(k.storeKey)
|
||||||
result := store.Get(GetRecordIndexKey(id))
|
result := store.Get(GetRecordIndexKey(id))
|
||||||
k.cdc.MustUnmarshal(result, &record)
|
k.cdc.MustUnmarshal(result, &record)
|
||||||
return record
|
return recordObjToRecord(store, record)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ListRecords - get all records.
|
// ListRecords - get all records.
|
||||||
|
Loading…
Reference in New Issue
Block a user