mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-10 02:34:04 +09:00
GitHub API Compliance (& linting)
This commit is contained in:
@ -35,6 +35,9 @@ func SignedInID(ctx *macaron.Context, sess session.Store) int64 {
|
||||
// Check access token.
|
||||
if IsAPIPath(ctx.Req.URL.Path) {
|
||||
tokenSHA := ctx.Query("token")
|
||||
if len(tokenSHA) <= 0 {
|
||||
tokenSHA = ctx.Query("access_token")
|
||||
}
|
||||
if len(tokenSHA) == 0 {
|
||||
// Well, check with header again.
|
||||
auHead := ctx.Req.Header.Get("Authorization")
|
||||
|
Reference in New Issue
Block a user