const Router = require("koa-router") const { route } = require(".") const { serach, getinfo } = require("../util/ptgen") const router = new Router({ prefix:"/videoInfo" }) router.get("/search",async (ctx)=>{ let name = ctx.query.name let info = await serach(name) ctx.body = info }) router.get("/getinfo",async (ctx)=>{ let url = ctx.query.url let info = await getinfo(url) ctx.body = info }) module.exports = router