From 4de9a247ea97e0fb6940e14d679142b582351b74 Mon Sep 17 00:00:00 2001 From: Kim Lindhardt Madsen Date: Mon, 28 Sep 2015 15:13:48 +0200 Subject: [PATCH] changed file and line type to strings --- routers/api/v1/repo_commits.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routers/api/v1/repo_commits.go b/routers/api/v1/repo_commits.go index d4dfa1fe1..6c4a7fb40 100644 --- a/routers/api/v1/repo_commits.go +++ b/routers/api/v1/repo_commits.go @@ -11,6 +11,7 @@ import ( "github.com/gogits/gogs/modules/git" "github.com/gogits/gogs/modules/log" "github.com/gogits/gogs/modules/middleware" + "github.com/gogits/gogs/modules/base" ) func ToApiSignature(signature *git.Signature) *api.Signature { @@ -70,7 +71,7 @@ func ToApiDiffFile(diffFile *models.DiffFile) *api.DiffFile { Index: diffFile.Index, Addition: diffFile.Addition, Deletion: diffFile.Deletion, - Type: diffFile.Type, + Type: base.DiffTypeToStr(diffFile.Type), IsCreated: diffFile.IsCreated, IsDeleted: diffFile.IsDeleted, IsBin: diffFile.IsBin, @@ -105,7 +106,7 @@ func ToApiDiffLine(diffLine *models.DiffLine) *api.DiffLine { return &api.DiffLine{ LeftIdx: diffLine.LeftIdx, RightIdx: diffLine.RightIdx, - Type: diffLine.Type, + Type: base.DiffLineTypeToStr(diffLine.Type), Content: diffLine.Content, } }