deprecate useless files

This commit is contained in:
2023-08-11 16:20:10 +08:00
parent e5d983b545
commit 1110594fad
2 changed files with 0 additions and 2 deletions
@@ -0,0 +1,21 @@
package.path = package.path .. ';<SCRIPT_PATH>/?.lua';
local cjson = require "cjson"
local http = require "resty.http"
local create_task = require "lib.create_task"
local TaskTypes = require 'lib.task_type'
local verify = require('lib.jwt_verify')
local authHeader = ngx.req.get_headers().Authorization
local sudoerToken = ngx.req.get_headers().HtySudoerToken
verify(httpc, authHeader, sudoerToken)
local httpc = http.new()
ngx.req.read_body()
local req_body = cjson.decode(ngx.req.get_body_data())
print('req_body...', ngx.req.get_body_data())
local media_id = req_body['media_id']
local task_text = cjson.encode({ task_type = TaskTypes.CONVERT_AUDIO_FILE, payload = { media_id = media_id } })
create_task(httpc, task_text, authHeader, sudoerToken)