in progress: table for units of measurements, etc
This commit is contained in:
14
server/models/dropdownValues.ts
Normal file
14
server/models/dropdownValues.ts
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user