fixes to delete operation

merge-requests/23/merge
Matthew 2021-03-06 19:25:06 -05:00
parent 0289632f50
commit 09f9cd4f63
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 3 additions and 3 deletions

View File

@ -173,7 +173,7 @@ export default class Root extends Route {
}); });
} }
await executiveOrder.delete(); await this.server.client.db.ExecutiveOrder.deleteOne({ oID: req.params.id });
res.status(200).json({ message: `Executive Order with ID ${req.params.id} deleted.` }); res.status(200).json({ message: `Executive Order with ID ${req.params.id} deleted.` });
}); });
@ -219,7 +219,7 @@ export default class Root extends Route {
}); });
} }
await motion.delete(); await this.server.client.db.Motion.deleteOne({ oID: req.params.id });
res.status(200).json({ message: `Motion with ID ${req.params.id} deleted.` }); res.status(200).json({ message: `Motion with ID ${req.params.id} deleted.` });
}); });
@ -264,7 +264,7 @@ export default class Root extends Route {
}); });
} }
await proclamation.delete(); await this.server.client.db.Proclamation.deleteOne({ oID: req.params.id });
res.status(200).json({ message: `Proclamation with ID ${req.params.id} deleted.` }); res.status(200).json({ message: `Proclamation with ID ${req.params.id} deleted.` });
}); });