Skip to content

Handling arrays returned from API #4

@kodumbeats

Description

@kodumbeats

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions