From b62192b20bd590405385cd5787c9e55a02c0b29a Mon Sep 17 00:00:00 2001 From: DevMiner Date: Wed, 28 Aug 2024 01:50:10 +0200 Subject: [PATCH] fix(user): omit fields array when it's nil --- pkg/versia/actor_user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/versia/actor_user.go b/pkg/versia/actor_user.go index 78543f4..6acbb28 100644 --- a/pkg/versia/actor_user.go +++ b/pkg/versia/actor_user.go @@ -22,7 +22,7 @@ type User struct { DisplayName *string `json:"display_name,omitempty"` // Fields is a list of fields that the user has filled out. - Fields []UserField `json:"fields"` + Fields []UserField `json:"fields,omitempty"` // Username is the username of the user. Must be unique on the instance and match the following regex: ^[a-z0-9_-]+$ Username string `json:"username"`