From 53c8e4263b71d20e8decfcc7a6970e3497473bec Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 9 Jun 2018 16:06:47 +0800 Subject: models: skip JSON for fields skipped by XORM Reduce output JSON size by backup command --- models/token.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'models/token.go') diff --git a/models/token.go b/models/token.go index 7cac1a3f..7e1dc166 100644 --- a/models/token.go +++ b/models/token.go @@ -20,12 +20,12 @@ type AccessToken struct { Name string Sha1 string `xorm:"UNIQUE VARCHAR(40)"` - Created time.Time `xorm:"-"` + Created time.Time `xorm:"-" json:"-"` CreatedUnix int64 - Updated time.Time `xorm:"-"` // Note: Updated must below Created for AfterSet. + Updated time.Time `xorm:"-" json:"-"` // Note: Updated must below Created for AfterSet. UpdatedUnix int64 - HasRecentActivity bool `xorm:"-"` - HasUsed bool `xorm:"-"` + HasRecentActivity bool `xorm:"-" json:"-"` + HasUsed bool `xorm:"-" json:"-"` } func (t *AccessToken) BeforeInsert() { -- cgit v1.2.3