refactoring controller responses (in progress)

This commit is contained in:
Mikayla Dobson
2022-12-12 20:07:09 -06:00
parent 362cf752d0
commit d2b06ced7a
6 changed files with 83 additions and 44 deletions

View File

@@ -11,7 +11,7 @@ export class User {
const statement = `SELECT * FROM recipin.appusers`;
const result = await pool.query(statement);
if (result.rows.length) return result.rows;
return null;
return [];
} catch (error: any) {
throw new Error(error);
}