From 58cdb38156b2260fe57eae3dc5677b5750f87e25 Mon Sep 17 00:00:00 2001 From: 付智勇 <fuzhiyong@efangtec.com> Date: Thu, 12 Oct 2017 13:48:49 +0800 Subject: [PATCH] no message --- controller/recordInfoController.js | 5 +++-- services/recordInfoService.js | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/controller/recordInfoController.js b/controller/recordInfoController.js index 191311e..cd2f988 100644 --- a/controller/recordInfoController.js +++ b/controller/recordInfoController.js @@ -80,8 +80,9 @@ recordInfoController.prototype.tencentRecordInfo = async(ctx,next)=>{ recordInfoController.prototype.getRecordFileURL = async(ctx,next)=>{ try { - const path = ctx.request.body.path; - let recordInfo = await recordInfoService.getRecordFileURL(path) + const time = ctx.request.body.time; + const path = ctx.request.body.path; + let recordInfo = await recordInfoService.getRecordFileURL(path,time) return recordInfo; } catch (e) { console.log(e) diff --git a/services/recordInfoService.js b/services/recordInfoService.js index 5bd1633..a56113d 100644 --- a/services/recordInfoService.js +++ b/services/recordInfoService.js @@ -43,13 +43,13 @@ recordInfoService.prototype.tencentRecordInfo = async(channelId)=>{ } } -recordInfoService.prototype.getRecordFileURL = async(URL)=>{ +recordInfoService.prototype.getRecordFileURL = async(path,time)=>{ try { - let path = '/netWorkSchool/Agora_Recording_SDK_for_Linux_FULL/samples'+URL - let myPath = '/Users/fzy/Downloads/Agora_Recording_SDK_for_Linux_FULL/samples/'+URL + let pathURL = '/netWorkSchool/Agora_Recording_SDK_for_Linux_FULL/samples/'+time+"/"+path + let myPath = '/Users/fzy/Downloads/Agora_Recording_SDK_for_Linux_FULL/samples/'+time+"/"+path let shell = `/20171011/markettest_1227676976_023539/` // let filenames = await callfile.exec(myPath) - let files=fs.readdirSync(path); + let files=fs.readdirSync(myPath); console.log(files) return files } catch (error) { -- libgit2 0.24.0