refactor lib
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
package.path = package.path .. ';<SCRIPT_PATH>/?.lua';
|
||||
|
||||
local cjson = require "cjson"
|
||||
local pl = require "pl.pretty"
|
||||
local http = require 'resty.http'
|
||||
local uuid = require "resty.jit-uuid"
|
||||
local upyun_upload = require("lib.upyun_upload")
|
||||
@@ -17,7 +18,7 @@ local function convert()
|
||||
local req_body = cjson.decode(ngx.req.get_body_data())
|
||||
ngx.log(ngx.INFO, 'REQ_BODY -> ', ngx.req.get_body_data())
|
||||
|
||||
local input_audio_file = get_wx_media(httpc, req_body["payload"]["media_id"]);
|
||||
local input_audio_file = get_wx_media(httpc, req_body["payload"]["media_id"], cjson, pl);
|
||||
local converted_audio_file = file_dir .. "/" .. uuid.generate_v4() .. ".mp3";
|
||||
|
||||
ngx.log(ngx.INFO, "Input audio file -> ", input_audio_file);
|
||||
|
||||
Reference in New Issue
Block a user