Take a look at this code which uses better-sqlite3
:
router.post('/auth', (req, res) => {
var rc = req.params('code')
var code_entry = db.prepare('SELECT * FROM pending_registrations WHERE code = ?').get(rc)
if (code_entry === undefined) {
res.send({ success: false })
}
Do I need to verify that code
parameter of the post query is correctly formatted? Is it possible for this code to malfunction if input is bad?