use Next.js

This commit is contained in:
polv committed 2020-12-17 23:15:28 +07:00
1 parent cf94c66807
commit 20a00d5ab3
34 files changed
+7117 -1

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import { doSearch } from '~/server'
import type { NextApiRequest, NextApiResponse } from 'next'
export default async (req: NextApiRequest, res: NextApiResponse) => {
const r = await doSearch({
q: req.query.q as string,
tag: req.query.tag as string,
page: parseInt(req.query.page as string) || 1
})
res.json(r)
}