Added poll create route in backend✔️

This commit is contained in:
Manik Maity
2024-11-08 20:27:06 +05:30
parent 9f689beb9d
commit 10425305dd
9 changed files with 237 additions and 16 deletions

View File

@@ -0,0 +1,11 @@
import PollModel from "../models/poll.model.js";
export async function createPollByData(data) {
try {
const poll = await PollModel.create(data);
return poll;
}
catch(err){
throw err;
}
}