1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-09-13 09:40:48 +08:00
parent eab3c6c447
commit ec4cc2b660
3 changed files with 4 additions and 2 deletions

View File

@ -263,6 +263,8 @@ const (
FULL = "full" FULL = "full"
LINK = "link" LINK = "link"
MERGE = "merge" MERGE = "merge"
QS = "?"
) )
const SPIDE = "spide" const SPIDE = "spide"

View File

@ -97,7 +97,7 @@ func (s Client) List(m *ice.Message, arg ...string) {
func init() { ice.ChatCtxCmd(Client{}) } func init() { ice.ChatCtxCmd(Client{}) }
func (s Client) RedirectURI(m *ice.Message) string { 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) { func (s Client) Login(m *ice.Message, arg ...string) {
if state, code := m.Option(STATE), m.Option(CODE); !m.Warn(state == "" || code == "") { if state, code := m.Option(STATE), m.Option(CODE); !m.Warn(state == "" || code == "") {

View File

@ -59,7 +59,7 @@ func init() {
}) })
m.PushAction(mdb.DELETE) 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)) mdb.HashSelect(m, m.Option(mdb.HASH))
web.SpideDelete(_oauth_header(m), API_GITHUB+"user/keys/"+m.Option(mdb.ID)) web.SpideDelete(_oauth_header(m), API_GITHUB+"user/keys/"+m.Option(mdb.ID))
}}, }},