build: add pnpm
This commit is contained in:
@ -8,7 +8,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
const user = await getAuthenticatedUser(req)
|
||||
if (!user) return notAuthenticated(res)
|
||||
|
||||
const id = req.query.userId.toString()
|
||||
const id = req.query.userId as string
|
||||
if (req.method === 'PUT') {
|
||||
const data = typeof req.body === 'string' ? JSON.parse(req.body) : req.body
|
||||
const typebots = await prisma.user.update({
|
||||
|
@ -9,7 +9,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
if (!user) return notAuthenticated(res)
|
||||
|
||||
if (req.method === 'DELETE') {
|
||||
const id = req.query.tokenId.toString()
|
||||
const id = req.query.tokenId as string
|
||||
const apiToken = await prisma.apiToken.delete({
|
||||
where: { id },
|
||||
})
|
||||
|
Reference in New Issue
Block a user