修复:notfound处理
This commit is contained in:
parent
9d0fe5b008
commit
5795a3f8d6
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue