修复:notfound处理

This commit is contained in:
yystopf 2022-08-03 09:45:09 +08:00
parent 9d0fe5b008
commit 5795a3f8d6
1 changed files with 5 additions and 1 deletions

View File

@ -186,7 +186,11 @@ func GetPullRequestVersionDiff(ctx *context.APIContext) {
break
}
}
ctx.JSON(http.StatusOK, targetDiffFile)
if targetDiffFile == nil {
ctx.NotFound()
} else {
ctx.JSON(http.StatusOK, targetDiffFile)
}
}
}