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 => {
|
await getMediaInfo(url).then(value => {
|
||||||
data = value;
|
data = value;
|
||||||
})
|
})
|
||||||
|
let verify = (data.media === null)
|
||||||
|
console.info(verify)
|
||||||
ctx.body = {
|
ctx.body = {
|
||||||
code: 0,
|
code: verify ? -1 : 0,
|
||||||
msg: "",
|
msg: verify ? "读取文件失败" : "",
|
||||||
data: data
|
data: data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user