Skip to content

Commit

Permalink
Handle delete too x2
Browse files Browse the repository at this point in the history
  • Loading branch information
zeripath committed Feb 17, 2020
1 parent 4297c11 commit 6326239
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/api/v1/repo/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ func DeleteFile(ctx *context.APIContext, apiOpts api.DeleteFileOptions) {
// "$ref": "#/responses/error"

if !CanWriteFiles(ctx.Repo) {
ctx.Error(http.StatusInternalServerError, "DeleteFile", models.ErrUserDoesNotHaveAccessToRepo{
ctx.Error(http.StatusForbidden, "DeleteFile", models.ErrUserDoesNotHaveAccessToRepo{
UserID: ctx.User.ID,
RepoName: ctx.Repo.Repository.LowerName,
})
Expand Down

0 comments on commit 6326239

Please sign in to comment.