refactoring db seed

This commit is contained in:
Mikayla Dobson
2022-11-23 12:28:22 -06:00
parent 24023fefcb
commit b7e33b74e0
18 changed files with 139 additions and 120 deletions

View File

@@ -96,7 +96,7 @@ export class User {
async getFriends(id: string) {
try {
const sql = fs.readFileSync(appRoot + '/db/sql/friendships.sql').toString();
const sql = fs.readFileSync(appRoot + '/db/sql/derived/friendships.sql').toString();
const result = await pool.query(sql, [id]);
if (result.rows.length) return result.rows;
return null;