1
0
forked from x/icebergs
icebergs/base/web/admin.go
2023-09-19 21:35:37 +08:00

22 lines
520 B
Go

package web
import (
"net/http"
ice "shylinux.com/x/icebergs"
kit "shylinux.com/x/toolkits"
)
const ADMIN = "admin"
func init() {
Index.MergeCommands(ice.Commands{
ADMIN: {Name: "admin index list", Help: "管理", Hand: func(m *ice.Message, arg ...string) {
args := []string{}
kit.If(len(arg) == 0, func() { arg = append(arg, SPACE, DOMAIN) })
kit.For(arg[1:], func(v string) { args = append(args, ice.ARG, v) })
m.Cmdy(SPIDE, ice.OPS, SPIDE_RAW, http.MethodGet, CHAT_CMD+arg[0], args)
}},
})
}