(req, res)
| 3 | module.exports = { |
| 4 | list: { |
| 5 | async get(req, res) { |
| 6 | |
| 7 | if (!req.query.user_id) { |
| 8 | return res.error("阿里云账号不存在") |
| 9 | } |
| 10 | let info = db('account').find({ user_id: req.query.user_id }).value() |
| 11 | if (!info) { |
| 12 | return res.error("阿里云账号不存在") |
| 13 | } |
| 14 | |
| 15 | const cloud = new Cloud(info.id) |
| 16 | |
| 17 | try { |
| 18 | let list = await cloud.list(req.query.parent_file_id) |
| 19 | res.return(list) |
| 20 | } catch (error) { |
| 21 | // console.log(error) |
| 22 | res.error(error) |
| 23 | } |
| 24 | |
| 25 | } |
| 26 | }, |
| 27 | previewVideo: { |
| 28 | async get(req, res) { |
nothing calls this directly
no test coverage detected