Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling arrays returned from API #4

Closed
kodumbeats opened this issue Feb 21, 2021 · 3 comments
Closed

Handling arrays returned from API #4

kodumbeats opened this issue Feb 21, 2021 · 3 comments
Assignees

Comments

@kodumbeats
Copy link

When an API response returns an array, the CLI doesn't properly handle arrays. Because of this, as an example, permissions cannot be viewed via the CLI.

From the endpoint /v1/storage/files/{fileId}, the $permissions field is empty:

aspire :: ~ » appwrite storage getFile --fileId="6032c58d7ccb6"
$id : 6032c58d7ccb6
$permissions :
name : fnlist.png
dateCreated : 1613940109
signature : cea8e7c354353f26d9fbd4755005b518
mimeType : image/png
sizeOriginal : 26184

From /v1/storage/files and v1/functions, $permissions returns only the array with length in parentheses:

arrays

@eldadfux
Copy link
Member

Has this been fixed on 0.6.0 @christyjacob4 @kodumbeats ?

@kodumbeats
Copy link
Author

Looks like it's still an issue:
arraysincli

@christyjacob4
Copy link
Member

@eldadfux @kodumbeats Since the arrays can have an indefinite amount of nesting, I had decided to display only the first level of arrays in the form of a table. Once we decide on a proper logic to handle nested arrays and how to display them, I'll go ahead with the implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants