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/release.go | |
parent | 078549518d31ffc18e209230584640328e5a0420 (diff) |
models: skip JSON for fields skipped by XORM
Reduce output JSON size by backup command
Diffstat (limited to 'models/release.go')
-rw-r--r-- | models/release.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/models/release.go b/models/release.go index 2c350664..65f85431 100644 --- a/models/release.go +++ b/models/release.go @@ -24,24 +24,24 @@ import ( type Release struct { ID int64 RepoID int64 - Repo *Repository `xorm:"-"` + Repo *Repository `xorm:"-" json:"-"` PublisherID int64 - Publisher *User `xorm:"-"` + Publisher *User `xorm:"-" json:"-"` TagName string LowerTagName string Target string Title string Sha1 string `xorm:"VARCHAR(40)"` NumCommits int64 - NumCommitsBehind int64 `xorm:"-"` + NumCommitsBehind int64 `xorm:"-" json:"-"` Note string `xorm:"TEXT"` IsDraft bool `xorm:"NOT NULL DEFAULT false"` IsPrerelease bool - Created time.Time `xorm:"-"` + Created time.Time `xorm:"-" json:"-"` CreatedUnix int64 - Attachments []*Attachment `xorm:"-"` + Attachments []*Attachment `xorm:"-" json:"-"` } func (r *Release) BeforeInsert() { |