diff --git a/base/web/spide.go b/base/web/spide.go index 8768ff51..a6c1ec2e 100644 --- a/base/web/spide.go +++ b/base/web/spide.go @@ -263,6 +263,8 @@ const ( FULL = "full" LINK = "link" MERGE = "merge" + + QS = "?" ) const SPIDE = "spide" diff --git a/core/chat/oauth/client.go b/core/chat/oauth/client.go index f307d317..22e1fed6 100644 --- a/core/chat/oauth/client.go +++ b/core/chat/oauth/client.go @@ -97,7 +97,7 @@ func (s Client) List(m *ice.Message, arg ...string) { func init() { ice.ChatCtxCmd(Client{}) } func (s Client) RedirectURI(m *ice.Message) string { - return strings.Split(web.MergeURL2(m, web.ChatCmdPath(m.Message, m.PrefixKey(), ctx.ACTION, aaa.LOGIN)), "?")[0] + return strings.Split(web.MergeURL2(m, web.ChatCmdPath(m.Message, m.PrefixKey(), ctx.ACTION, aaa.LOGIN)), web.QS)[0] } func (s Client) Login(m *ice.Message, arg ...string) { if state, code := m.Option(STATE), m.Option(CODE); !m.Warn(state == "" || code == "") { diff --git a/misc/github/oauth.go b/misc/github/oauth.go index f329d823..82a7bf2f 100644 --- a/misc/github/oauth.go +++ b/misc/github/oauth.go @@ -59,7 +59,7 @@ func init() { }) m.PushAction(mdb.DELETE) }}, - mdb.DELETE: {Name: "delete", Help: "删除", Hand: func(m *ice.Message, arg ...string) { + mdb.DELETE: {Help: "删除", Hand: func(m *ice.Message, arg ...string) { mdb.HashSelect(m, m.Option(mdb.HASH)) web.SpideDelete(_oauth_header(m), API_GITHUB+"user/keys/"+m.Option(mdb.ID)) }},