Made user created poll route ✔️

This commit is contained in:
Manik Maity
2024-11-09 21:18:01 +05:30
parent a419f8f917
commit baaf726614
4 changed files with 51 additions and 5 deletions

View File

@@ -18,4 +18,14 @@ export async function findPollById(id) {
catch(err){
throw err;
}
}
export async function findPollsByCreatorId(id) {
try {
const polls = await PollModel.find({creatorId : id});
return polls;
}
catch(err){
throw err;
}
}