Created get Poll data route
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user