aboutsummaryrefslogtreecommitdiff
path: root/modules/middleware/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/middleware/auth.go')
-rw-r--r--modules/middleware/auth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go
index 4f92c8f8..be8db357 100644
--- a/modules/middleware/auth.go
+++ b/modules/middleware/auth.go
@@ -95,7 +95,7 @@ func Toggle(options *ToggleOptions) macaron.Handler {
if !ctx.IsSigned {
// Restrict API calls with error message.
if auth.IsAPIPath(ctx.Req.URL.Path) {
- ctx.HandleAPI(403, "Only signed in user is allowed to call APIs.")
+ ctx.APIError(403, "", "Only signed in user is allowed to call APIs.")
return
}