|
|
@ -32,7 +32,7 @@ const load_notes_stmt =
|
|
|
|
+" WHERE bn.bin_id = $1";
|
|
|
|
+" WHERE bn.bin_id = $1";
|
|
|
|
// {bin_id}
|
|
|
|
// {bin_id}
|
|
|
|
router.post('/load-notes', (req, res)=>{
|
|
|
|
router.post('/load-notes', (req, res)=>{
|
|
|
|
const bin_id = req.body.bind_id;
|
|
|
|
const bin_id = req.body.bin_id;
|
|
|
|
db.query(load_notes_stmt, [bin_id])
|
|
|
|
db.query(load_notes_stmt, [bin_id])
|
|
|
|
.then(result => {
|
|
|
|
.then(result => {
|
|
|
|
res.json({status: 'ok', bin:{id:bin_id}, notes:result.rows})
|
|
|
|
res.json({status: 'ok', bin:{id:bin_id}, notes:result.rows})
|
|
|
|