fix request body structure
This commit is contained in:
@@ -18,7 +18,7 @@ local function run()
|
|||||||
local req_body = cjson.decode(ngx.req.get_body_data())
|
local req_body = cjson.decode(ngx.req.get_body_data())
|
||||||
ngx.log(ngx.INFO, 'REQ_BODY -> ', 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)
|
upyun_upload.upload(downloaded_file)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ local function read_wx_file()
|
|||||||
ngx.log(ngx.INFO, 'REQ_BODY -> ', ngx.req.get_body_data())
|
ngx.log(ngx.INFO, 'REQ_BODY -> ', ngx.req.get_body_data())
|
||||||
|
|
||||||
local files = {}
|
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));
|
table.insert(files, get_wx_media(v));
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user