This commit is contained in:
yystopf 2023-01-12 17:20:45 +08:00
parent 1983c14386
commit c556386422
2 changed files with 3 additions and 2 deletions

View File

@ -117,10 +117,11 @@ func GetPullRequestVersionDiff(ctx *context.APIContext) {
}
targetDiffFile.Diff = strings.Join(afterStrings, "\n")
}
targetDiffFile.DiffFile = file
break
}
}
if targetDiffFile == nil {
if targetDiffFile.DiffFile == nil {
ctx.NotFound()
} else {
ctx.JSON(http.StatusOK, targetDiffFile)

View File

@ -5,6 +5,6 @@ import (
)
type DiffFile struct {
gitea_gitdiff.DiffFile
*gitea_gitdiff.DiffFile
Diff string
}