Files
coder/cli/testdata/coder_users_list_--output_json.golden
Bruno Quaresma 94c129c03d fix!: omit name, avatar_url and last_seen_at from responses when empty (#18005)
User name, avatar URL, and last seen at, are not required fields so they
can be empty. Instead of returning the 0 values from Go, we want to make
it more agnostic, and omit them when they are empty. This make the docs
and usage way clearer for consumers.
2025-05-23 11:35:05 -03:00

37 lines
905 B
Plaintext

[
{
"id": "==========[first user ID]===========",
"username": "testuser",
"name": "Test User",
"email": "testuser@coder.com",
"created_at": "====[timestamp]=====",
"updated_at": "====[timestamp]=====",
"last_seen_at": "====[timestamp]=====",
"status": "active",
"login_type": "password",
"organization_ids": [
"===========[first org ID]==========="
],
"roles": [
{
"name": "owner",
"display_name": "Owner"
}
]
},
{
"id": "==========[second user ID]==========",
"username": "testuser2",
"email": "testuser2@coder.com",
"created_at": "====[timestamp]=====",
"updated_at": "====[timestamp]=====",
"last_seen_at": "====[timestamp]=====",
"status": "dormant",
"login_type": "password",
"organization_ids": [
"===========[first org ID]==========="
],
"roles": []
}
]