diff options
author | Unknwon <u@gogs.io> | 2018-06-09 16:06:47 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2018-06-09 16:06:47 +0800 |
commit | 53c8e4263b71d20e8decfcc7a6970e3497473bec (patch) | |
tree | d37ce3c2745f46a97c490e116268829c6f5ae923 /models/token.go | |
parent | 078549518d31ffc18e209230584640328e5a0420 (diff) |
models: skip JSON for fields skipped by XORM
Reduce output JSON size by backup command
Diffstat (limited to 'models/token.go')
-rw-r--r-- | models/token.go | 8 |
1 files changed, 4 insertions, 4 deletions
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() { |