Fix building error

This commit is contained in:
Max Leiter 2023-01-07 15:55:25 -08:00
parent 6b0a6bf3b6
commit 6fb81d77b9
2 changed files with 3 additions and 2 deletions

View file

@ -32,7 +32,7 @@ const ButtonDropdown: React.FC<
> >
<Button <Button
iconLeft={<ArrowDown />} iconLeft={<ArrowDown />}
type={type} buttonType={type}
className={styles.icon} className={styles.icon}
/> />
</DropdownMenu.Trigger> </DropdownMenu.Trigger>

View file

@ -1,4 +1,5 @@
import { withMethods } from "@lib/api-middleware/with-methods" import { withMethods } from "@lib/api-middleware/with-methods"
import { authOptions } from "@lib/server/auth"
import { parseQueryParam } from "@lib/server/parse-query-param" import { parseQueryParam } from "@lib/server/parse-query-param"
import { searchPosts, ServerPostWithFiles } from "@lib/server/prisma" import { searchPosts, ServerPostWithFiles } from "@lib/server/prisma"
import { NextApiRequest, NextApiResponse } from "next" import { NextApiRequest, NextApiResponse } from "next"
@ -7,7 +8,7 @@ import { unstable_getServerSession } from "next-auth"
const handler = async (req: NextApiRequest, res: NextApiResponse) => { const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const { q, userId } = req.query const { q, userId } = req.query
const session = await unstable_getServerSession() const session = await unstable_getServerSession(req, res, authOptions)
const query = parseQueryParam(q) const query = parseQueryParam(q)
const user = parseQueryParam(userId) const user = parseQueryParam(userId)