fix: remove console statements
This commit is contained in:
@@ -25,7 +25,6 @@ export async function editApiKey(req: NextApiRequest, res: NextApiResponse<Respo
|
||||
}).then(apiKey => {
|
||||
res.status(200).json({ data: apiKey });
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
res.status(404).json({ message: `apiKey with ID ${safeQuery.data.id} not found and wasn't updated`, error })
|
||||
});
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ async function createApiKey(req: NextApiRequest, res: NextApiResponse<ResponseDa
|
||||
})
|
||||
.then((apiKey) => res.status(201).json({ data: apiKey }))
|
||||
.catch((error) => {
|
||||
// console.log(error);
|
||||
res.status(400).json({ message: "Could not create apiKey", error: error })
|
||||
}
|
||||
)
|
||||
|
||||
@@ -12,7 +12,6 @@ export default async function eventType(req: NextApiRequest, res: NextApiRespons
|
||||
const eventTypes = await prisma.eventType.findMany();
|
||||
res.status(200).json({ data: { ...eventTypes } });
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
// FIXME: Add zod for validation/error handling
|
||||
res.status(400).json({ error: error });
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ export default async function user(req: NextApiRequest, res: NextApiResponse<Res
|
||||
const users = await prisma.user.findMany();
|
||||
res.status(200).json({ data: { ...users } });
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
// FIXME: Add zod for validation/error handling
|
||||
res.status(400).json({ error: error });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user