diff --git a/server/api.server.js b/server/api.server.js index 20dff98..f3cab5a 100644 --- a/server/api.server.js +++ b/server/api.server.js @@ -174,7 +174,7 @@ app.get( const {rows} = await pool.query('select * from notes where id = $1', [ req.params.id, ]); - res.json(rows[0]); + res.json(rows[0] || null); }) );