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/comment.go | |
parent | 078549518d31ffc18e209230584640328e5a0420 (diff) |
models: skip JSON for fields skipped by XORM
Reduce output JSON size by backup command
Diffstat (limited to 'models/comment.go')
-rw-r--r-- | models/comment.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/models/comment.go b/models/comment.go index 417e4037..447c15db 100644 --- a/models/comment.go +++ b/models/comment.go @@ -52,26 +52,26 @@ type Comment struct { ID int64 Type CommentType PosterID int64 - Poster *User `xorm:"-"` + Poster *User `xorm:"-" json:"-"` IssueID int64 `xorm:"INDEX"` - Issue *Issue `xorm:"-"` + Issue *Issue `xorm:"-" json:"-"` CommitID int64 Line int64 Content string `xorm:"TEXT"` - RenderedContent string `xorm:"-"` + RenderedContent string `xorm:"-" json:"-"` - Created time.Time `xorm:"-"` + Created time.Time `xorm:"-" json:"-"` CreatedUnix int64 - Updated time.Time `xorm:"-"` + Updated time.Time `xorm:"-" json:"-"` UpdatedUnix int64 // Reference issue in commit message CommitSHA string `xorm:"VARCHAR(40)"` - Attachments []*Attachment `xorm:"-"` + Attachments []*Attachment `xorm:"-" json:"-"` // For view issue page. - ShowTag CommentTag `xorm:"-"` + ShowTag CommentTag `xorm:"-" json:"-"` } func (c *Comment) BeforeInsert() { |