fetches and displays measurement units

This commit is contained in:
Mikayla Dobson
2023-02-16 17:57:40 -06:00
parent 8ae6cf4ab0
commit 9e146f0825
6 changed files with 104 additions and 54 deletions

View File

@@ -3,7 +3,7 @@ import pool from "../db";
export default class Dropdown {
async getMeasurements() {
try {
const statement = `SELECT * FROM recipin.dropdownVals WHERE datatype = MEASUREMENTS`;
const statement = `SELECT * FROM recipin.dropdownVals WHERE datatype = 'MEASUREMENTS'`;
const result = await pool.query(statement);
if (result.rows.length) return result.rows;
return null;