Added vote route in backend

This commit is contained in:
Manik Maity
2024-11-12 19:47:58 +05:30
parent c61fe265a5
commit 451a57c438
8 changed files with 173 additions and 28 deletions

View File

@@ -0,0 +1,14 @@
import { z } from "zod";
const voteSchema = z.object({
pollId: z.string({
required_error: "Poll Id is required.",
invalid_type_error: "Poll Id should be a string.",
}),
optionId: z.string({
required_error: "Option Id is required.",
invalid_type_error: "Option Id should be a string.",
}),
});
export default voteSchema;