in progress: table for units of measurements, etc

This commit is contained in:
Mikayla Dobson
2023-02-16 17:25:10 -06:00
parent 46454a84c2
commit 8ae6cf4ab0
9 changed files with 116 additions and 108 deletions

View File

@@ -0,0 +1,14 @@
import pool from "../db";
export default class Dropdown {
async getMeasurements() {
try {
const statement = `SELECT * FROM recipin.dropdownVals WHERE datatype = MEASUREMENTS`;
const result = await pool.query(statement);
if (result.rows.length) return result.rows;
return null;
} catch (error: any) {
throw new Error(error);
}
}
}