fix request body structure

This commit is contained in:
moicen
2022-06-26 15:41:41 +08:00
parent 8ee4eb11ea
commit f64809ac09
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ local function run()
local req_body = cjson.decode(ngx.req.get_body_data())
ngx.log(ngx.INFO, 'REQ_BODY -> ', ngx.req.get_body_data())
local downloaded_file = get_wx_media(req_body["payload"]["media_id"]);
local downloaded_file = get_wx_media(req_body["media_id"]);
upyun_upload.upload(downloaded_file)
end
+1 -1
View File
@@ -19,7 +19,7 @@ local function read_wx_file()
ngx.log(ngx.INFO, 'REQ_BODY -> ', ngx.req.get_body_data())
local files = {}
for v in pairs(req_body["payload"]["media_ids"]) do
for v in pairs(req_body["media_ids"]) do
table.insert(files, get_wx_media(v));
end