+ 菜单 v0.8.2

This commit is contained in:
Max 2021-10-12 12:19:19 +08:00
parent 976b4aa7eb
commit 4a62d5cc2c
5 changed files with 15 additions and 8 deletions

View file

@ -9,7 +9,7 @@ import (
)
// VERSION 版本号
const VERSION = "0.8.1"
const VERSION = "0.8.2"
// DOMAIN 许可域
const DOMAIN = "*.iqka.com"

View file

@ -79,7 +79,7 @@ func processReadFile(process *gou.Process) interface{} {
// processGetToken 上传文件到腾讯云对象存储 COS
func processGetToken(process *gou.Process) interface{} {
process.ValidateArgNums(2)
process.ValidateArgNums(1)
name := process.ArgsString(0, "oss")
// bucket := process.ArgsString(1)
if name != "oss" {

View file

@ -29,10 +29,7 @@ func init() {
}
func TestProcessGetToken(t *testing.T) {
args := []interface{}{
"oss",
"hh",
}
args := []interface{}{"oss"}
process := gou.NewProcess("xiang.fs.GetToken", args...)
response := processGetToken(process)
assert.NotNil(t, response)
@ -57,6 +54,6 @@ func TestProcessGetToken(t *testing.T) {
// 上传字符串。
now := fmt.Sprintf("%d", time.Now().UnixNano())
err = bucket.PutObject("image-appcook/xiang/unit-test.txt", strings.NewReader(now))
err = bucket.PutObject("xiang/unit-test.txt", strings.NewReader(now))
assert.Nil(t, err)
}

View file

@ -32,7 +32,7 @@
"method": "GET",
"guard": "-",
"process": "xiang.fs.GetToken",
"in": ["$query.name", "$query.bucket"],
"in": ["$query.name"],
"out": {
"status": 200,
"type": "application/json"

View file

@ -38,6 +38,16 @@
"type": "application/json"
}
},
{
"path": "/menu",
"method": "GET",
"process": "flows.xiang.menu",
"in": [],
"out": {
"status": 200,
"type": "application/json"
}
},
{
"path": "/info",
"method": "GET",