diff --git a/global/vars.go b/global/vars.go index d38acb38..4779e508 100644 --- a/global/vars.go +++ b/global/vars.go @@ -9,7 +9,7 @@ import ( ) // VERSION 版本号 -const VERSION = "0.8.1" +const VERSION = "0.8.2" // DOMAIN 许可域 const DOMAIN = "*.iqka.com" diff --git a/xfs/process.go b/xfs/process.go index ea4a5efb..0fdd337e 100644 --- a/xfs/process.go +++ b/xfs/process.go @@ -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" { diff --git a/xfs/process_test.go b/xfs/process_test.go index 55f6b434..4ecc6bcf 100644 --- a/xfs/process_test.go +++ b/xfs/process_test.go @@ -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) } diff --git a/xiang/apis/storage.http.json b/xiang/apis/storage.http.json index 8f7a8ad4..c1eea7eb 100644 --- a/xiang/apis/storage.http.json +++ b/xiang/apis/storage.http.json @@ -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" diff --git a/xiang/apis/user.http.json b/xiang/apis/user.http.json index db701bb2..9d62bdf6 100644 --- a/xiang/apis/user.http.json +++ b/xiang/apis/user.http.json @@ -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",