Created get Poll data route

This commit is contained in:
Manik Maity
2024-11-09 20:53:28 +05:30
parent bd1d3e988d
commit a419f8f917
7 changed files with 60 additions and 100 deletions

View File

@@ -8,4 +8,14 @@ export async function createPollByData(data) {
catch(err){
throw err;
}
}
export async function findPollById(id) {
try {
const poll = await PollModel.findById(id).populate("creatorId");
return poll;
}
catch(err){
throw err;
}
}