🐛 修复修改服务器导致 Agent 离线

This commit is contained in:
naiba
2021-07-25 23:50:08 +08:00
parent bcb95ba718
commit e24121bdf7
6 changed files with 28 additions and 12 deletions

View File

@@ -8,7 +8,6 @@ import (
"strings"
"github.com/gin-gonic/gin"
"github.com/google/go-github/github"
GitHubAPI "github.com/google/go-github/github"
"golang.org/x/oauth2"
GitHubOauth2 "golang.org/x/oauth2/github"
@@ -87,7 +86,7 @@ func (oa *oauth2controller) callback(c *gin.Context) {
client = GitHubAPI.NewClient(oc)
}
}
var gu *github.User
var gu *GitHubAPI.User
if err == nil {
gu, _, err = client.Users.Get(ctx, "")
}