Skip to content

Commit a2cb233

Browse files
committed
Some fixes
1 parent 3bc926b commit a2cb233

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/web/repo/fork.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func ForkPost(ctx *context.Context) {
151151
ctx.Data["ContextUser"] = ctxUser
152152

153153
if ctx.HasError() {
154-
ctx.JSONError(tplFork)
154+
ctx.JSONError(ctx.GetErrMsg())
155155
return
156156
}
157157

@@ -184,7 +184,7 @@ func ForkPost(ctx *context.Context) {
184184
ctx.ServerError("CanCreateOrgRepo", err)
185185
return
186186
} else if !isAllowedToFork {
187-
ctx.JSONError(http.StatusForbidden)
187+
ctx.HTTPError(http.StatusForbidden)
188188
return
189189
}
190190
}

0 commit comments

Comments
 (0)