1
0
Fork 0
forked from forgejo/forgejo

refactor API routes and some work for #976

This commit is contained in:
Unknwon 2015-12-04 17:16:42 -05:00
parent e0bae9547a
commit 56dd430a10
17 changed files with 374 additions and 377 deletions

View file

@ -130,22 +130,3 @@ func Toggle(options *ToggleOptions) macaron.Handler {
}
}
}
// Contexter middleware already checks token for user sign in process.
func ApiReqToken() macaron.Handler {
return func(ctx *Context) {
if !ctx.IsSigned {
ctx.Error(401)
return
}
}
}
func ApiReqBasicAuth() macaron.Handler {
return func(ctx *Context) {
if !ctx.IsBasicAuth {
ctx.Error(401)
return
}
}
}