Skip to content
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

Open
chaingrok opened this issue Jan 18, 2020 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed type:improvement New feature or request

Comments

@chaingrok
Copy link

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

@bonedaddy bonedaddy added good first issue Good for newcomers help wanted Extra attention is needed type:improvement New feature or request labels Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers help wanted Extra attention is needed type:improvement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants