'EXPRESS and SQL "syntax error at or near "$""
I'm making PFP route with EXPRESS and PSQL and I have a little problem.
I get an error
Syntax error at or near "$"
Code:
if (!imgbbLink.startsWith("https://ibb.co/")) {
return res.status(400).json("Something went wrong")
}
await pool.query(
"UPDATE users SET user_profile_image = 1$ WHERE user_id = $2",
[imgbbLink, req.user.id]
)
res.json("PFP updated successfully")
I think there shouldn't be any problem?
Thanks.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
