Skip to content

Commit

Permalink
Remove started code from schema
Browse files Browse the repository at this point in the history
  • Loading branch information
harshvsri committed Sep 26, 2024
1 parent 2efa8a7 commit 2a12c9a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
1 change: 0 additions & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ model Problem {
id String @id @default(cuid())
title String
description String
starterCode String
examples Example[]
testCases TestCase[]
difficulty ProblemDifficulty @default(EASY)
Expand Down
2 changes: 1 addition & 1 deletion src/routers/teacherAuth.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
const teacherAuthRouter = Router();

teacherAuthRouter.post("/signup", validateTeacherSignup, async (req, res) => {
const { name, email, password, subjectCode } = req.body;
const { name, email, password } = req.body;
const teacher = await prisma.teacher.create({
data: {
name,
Expand Down
9 changes: 0 additions & 9 deletions src/utils/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ export const validateTeacherSignup = [
}
next();
},
(req, res, next) => {
const { subjectCode } = req.body;
if (!Object.values(SubjectCode).includes(subjectCode)) {
return res
.status(400)
.json({ errors: [{ msg: "Invalid subject code" }] });
}
next();
},
];

export const validateTeacherSignin = [
Expand Down

0 comments on commit 2a12c9a

Please sign in to comment.