1
0
forked from x/ContextOS
Change-Id: Ibb06a87e299b177b8221ea4ffe2f951fa3274e09
This commit is contained in:
shaoying 2018-12-07 19:33:46 +08:00
parent cc12c2595d
commit e8a1693321
2 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@ install:
@go get github.com/skip2/go-qrcode
@go get github.com/gomarkdown/markdown
@go get github.com/PuerkitoBio/goquery
go install $(BENCH)
GOPATH=$(PWD):$(GOPATH) go install $(BENCH)
@date
# bench web.code.counter nmake 1

View File

@ -863,8 +863,9 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
if key == "" {
key = m.Sess("aaa").Cmd("md5", m.Option("remote_addr"), create_time).Result(0)
}
link := fmt.Sprintf("%s?bench=%s", m.Conf("site"), key)
if _, ok := m.Confv("bench").(map[string]interface{}); !ok {
if _, ok := m.Confv("bench", key).(map[string]interface{}); !ok {
m.Log("info", "%s create bench %s", m.Option("username"), key)
m.Confv("bench", key, map[string]interface{}{
"remote_addr": m.Option("remote_addr"),
@ -884,8 +885,8 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
return
}
bench := m.Confv("bench").(map[string]interface{})
if len(arg) > 0 && arg[0] == "check" { // 检查工作流
bench := m.Confv("bench", m.Option("bench")).(map[string]interface{})
if bench["creator"].(string) != arg[1] {
switch bench["share"].(string) {
case "private":
@ -899,6 +900,7 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
return
}
bench := m.Confv("bench").(map[string]interface{})
if len(arg) > 0 && arg[0] == "delete" { // 删除工作流
delete(bench, arg[1])
arg = arg[2:]