diff options
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r-- | routers/api/v1/api.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 23a85759c2..3a539f6ce7 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -80,7 +80,7 @@ import ( func sudo() macaron.Handler { return func(ctx *context.APIContext) { sudo := ctx.Query("sudo") - if len(sudo) <= 0 { + if len(sudo) == 0 { sudo = ctx.Req.Header.Get("Sudo") } |