diff --git a/app/api/grade/route.ts b/app/api/grade/route.ts index 12eb30a..5ef9ca6 100644 --- a/app/api/grade/route.ts +++ b/app/api/grade/route.ts @@ -16,7 +16,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) await prisma.grade.findFirst({where: {key: body.key}}).then(async (grade) => { if (grade) { await prisma.grade.create({data: {test: 1, grade: body.grade, key: body.key}}) - res.status(200).json({message: 'Grade updated'}) + res.status(200).json({message: 'Grade updated', cookie: 'voted=true'}) } else { res.status(404).json({message: 'Key not found'}) }