Made user created poll route ✔️
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user