aboutsummaryrefslogtreecommitdiff
path: root/models/pull.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2018-06-09 16:06:47 +0800
committerUnknwon <u@gogs.io>2018-06-09 16:06:47 +0800
commit53c8e4263b71d20e8decfcc7a6970e3497473bec (patch)
treed37ce3c2745f46a97c490e116268829c6f5ae923 /models/pull.go
parent078549518d31ffc18e209230584640328e5a0420 (diff)
models: skip JSON for fields skipped by XORM
Reduce output JSON size by backup command
Diffstat (limited to 'models/pull.go')
-rw-r--r--models/pull.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/models/pull.go b/models/pull.go
index b4524f16..43211ed7 100644
--- a/models/pull.go
+++ b/models/pull.go
@@ -48,13 +48,13 @@ type PullRequest struct {
Status PullRequestStatus
IssueID int64 `xorm:"INDEX"`
- Issue *Issue `xorm:"-"`
+ Issue *Issue `xorm:"-" json:"-"`
Index int64
HeadRepoID int64
- HeadRepo *Repository `xorm:"-"`
+ HeadRepo *Repository `xorm:"-" json:"-"`
BaseRepoID int64
- BaseRepo *Repository `xorm:"-"`
+ BaseRepo *Repository `xorm:"-" json:"-"`
HeadUserName string
HeadBranch string
BaseBranch string
@@ -63,8 +63,8 @@ type PullRequest struct {
HasMerged bool
MergedCommitID string `xorm:"VARCHAR(40)"`
MergerID int64
- Merger *User `xorm:"-"`
- Merged time.Time `xorm:"-"`
+ Merger *User `xorm:"-" json:"-"`
+ Merged time.Time `xorm:"-" json:"-"`
MergedUnix int64
}