#3345 dump content directly to HTTP ResponseWriter

This commit is contained in:
Unknwon 2016-07-30 23:39:58 +08:00
parent dfab54d5a2
commit 10dc330640
5 changed files with 31 additions and 22 deletions

View file

@ -195,16 +195,15 @@ func Diff(ctx *context.Context) {
}
func RawDiff(ctx *context.Context) {
diff, err := models.GetRawDiff(
if err := models.GetRawDiff(
models.RepoPath(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name),
ctx.Params(":sha"),
ctx.Params(":ext"),
)
if err != nil {
ctx.Handle(404, "GetRawDiff", err)
models.RawDiffType(ctx.Params(":ext")),
ctx.Resp,
); err != nil {
ctx.Handle(500, "GetRawDiff", err)
return
}
ctx.HandleText(200, diff)
}
func CompareDiff(ctx *context.Context) {