Don't return the subscription when it is empty

This commit is contained in:
kolaente 2021-02-13 20:57:45 +01:00
parent 3a33805919
commit 4be50c54c6
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ type List struct {
// The subscription status for the user reading this list. You can only read this property, use the subscription endpoints to modify it.
// Will only returned when retreiving one list.
Subscription *Subscription `xorm:"-" json:"subscription"`
Subscription *Subscription `xorm:"-" json:"subscription,omitempty"`
// A timestamp when this list was created. You cannot change this value.
Created time.Time `xorm:"created not null" json:"created"`

View File

@ -52,7 +52,7 @@ type Namespace struct {
// The subscription status for the user reading this namespace. You can only read this property, use the subscription endpoints to modify it.
// Will only returned when retreiving one namespace.
Subscription *Subscription `xorm:"-" json:"subscription"`
Subscription *Subscription `xorm:"-" json:"subscription,omitempty"`
// A timestamp when this namespace was created. You cannot change this value.
Created time.Time `xorm:"created not null" json:"created"`

View File

@ -93,7 +93,7 @@ type Task struct {
// The subscription status for the user reading this task. You can only read this property, use the subscription endpoints to modify it.
// Will only returned when retreiving one task.
Subscription *Subscription `xorm:"-" json:"subscription"`
Subscription *Subscription `xorm:"-" json:"subscription,omitempty"`
// A timestamp when this task was created. You cannot change this value.
Created time.Time `xorm:"created not null" json:"created"`