add MediaInfo接口添加错误判断
This commit is contained in:
parent
138dbf542f
commit
0c010beb54
@ -15,9 +15,11 @@ router.get("/getMediaInfo", async (ctx) => {
|
||||
await getMediaInfo(url).then(value => {
|
||||
data = value;
|
||||
})
|
||||
let verify = (data.media === null)
|
||||
console.info(verify)
|
||||
ctx.body = {
|
||||
code: 0,
|
||||
msg: "",
|
||||
code: verify ? -1 : 0,
|
||||
msg: verify ? "读取文件失败" : "",
|
||||
data: data
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user