Added delete poll route in backend
This commit is contained in:
@@ -28,4 +28,14 @@ export async function findPollsByCreatorId(id) {
|
||||
catch(err){
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
export async function deletePollById(id) {
|
||||
try {
|
||||
const poll = await PollModel.findByIdAndDelete(id);
|
||||
return poll;
|
||||
}
|
||||
catch(err){
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user