mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 18:17:19 +00: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