forked from x/icebergs
opt some
This commit is contained in:
parent
af0d446abc
commit
3e63a8c243
@ -1,6 +1,8 @@
|
|||||||
package web
|
package web
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
"shylinux.com/x/icebergs/base/ctx"
|
"shylinux.com/x/icebergs/base/ctx"
|
||||||
"shylinux.com/x/icebergs/base/mdb"
|
"shylinux.com/x/icebergs/base/mdb"
|
||||||
@ -18,5 +20,8 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func AddPortalProduct(m *ice.Message, name, text string, order float64, arg ...string) {
|
func AddPortalProduct(m *ice.Message, name, text string, order float64, arg ...string) {
|
||||||
m.Cmd("web.product", mdb.CREATE, mdb.NAME, name, mdb.TEXT, text, mdb.ORDER, order, ctx.INDEX, m.PrefixKey(), ctx.ARGS, kit.Format(arg))
|
msg := m.Spawn()
|
||||||
|
m.GoSleep("300ms", func() {
|
||||||
|
msg.Cmd("web.product", mdb.CREATE, mdb.NAME, name, mdb.TEXT, strings.TrimSpace(text), mdb.ORDER, order, ctx.INDEX, msg.PrefixKey(), ctx.ARGS, kit.Format(arg))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user