This repository has been archived by the owner on Jan 13, 2021. It is now read-only.
Safer list structure for https://api.temporal.cloud//v2/account/key/ipfs/get #438
Labels
good first issue
Good for newcomers
help wanted
Extra attention is needed
type:improvement
New feature or request
Why are you submitting this feature request
the REST requests GET[https://api.temporal.cloud//v2/account/key/ipfs/get]
returns
{
"code": 200,
"response": {
"key_ids": [
"QmY8Ho4JurCFM8E3sf7tHc7px6J8s3tw1QPbpczrKZrtfY",
"12D3KooWAY2D4azyxxiAYPPdEwnrZf4M1aa5RHtaDrJ5T3VqTdJb"
],
"key_names": [
"chaingrok-TestKey1",
"chaingrok-TestKey2"
]
}
}
In current structure, one needs to scan both arrays in parallel to obtain a pair (key_id,key_name) that usually have to be used together.
Describe the solution you'd like
A JSON array of pairs of corresponding pairs would be safer and simpler to manipulate: [{"key_name":"abc","key_value":"xyz"}]. Otherwise the db -> json serializer on REST server side as to be fully sure of identical serialization order for the 2 current arrays to avoid mix-match of different key attributes in current solution
Describe alternatives you've considered
We can of course do this creation of pairs by coding it on client side. It just augments lines of code to be written and is error prone
The text was updated successfully, but these errors were encountered: