We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
code:
#works router.get('/user:id', async (req, res) => { const { id } = req.params; const user = await sqlSELECT * FROM users WHERE ${id} = id
SELECT * FROM users WHERE ${id} = id
res.json(user); });
#doesn't work router.delete('/user:id', async (req, res) => { const { id } = req.params; const userd = await sqlDELETE FROM users WHERE ${id} = id res.json(userd) res.sendStatus(200); });
DELETE FROM users WHERE ${id} = id
The text was updated successfully, but these errors were encountered:
https://aaa-2ws1m5azj-akmuharramigmailcoms-projects.vercel.app/user/user?id=1
Sorry, something went wrong.
No branches or pull requests
code:
#works
router.get('/user:id', async (req, res) => {
const { id } = req.params;
const user = await sql
SELECT * FROM users WHERE ${id} = id
res.json(user);
});
#doesn't work
router.delete('/user:id', async (req, res) => {
const { id } = req.params;
const userd = await sql
DELETE FROM users WHERE ${id} = id
res.json(userd)
res.sendStatus(200);
});
The text was updated successfully, but these errors were encountered: