GitHub API Compliance (& linting)
This commit is contained in:
parent
71bb6df75a
commit
e6cfccdd40
5 changed files with 61 additions and 9 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue