mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
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.
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
{
|
||||
"id": "==========[first user ID]===========",
|
||||
"username": "testuser",
|
||||
"avatar_url": "",
|
||||
"name": "Test User",
|
||||
"email": "testuser@coder.com",
|
||||
"created_at": "====[timestamp]=====",
|
||||
@@ -23,8 +22,6 @@
|
||||
{
|
||||
"id": "==========[second user ID]==========",
|
||||
"username": "testuser2",
|
||||
"avatar_url": "",
|
||||
"name": "",
|
||||
"email": "testuser2@coder.com",
|
||||
"created_at": "====[timestamp]=====",
|
||||
"updated_at": "====[timestamp]=====",
|
||||
|
||||
Reference in New Issue
Block a user