From 02d2ab025c16d956f24167b1ad5b80a5547c5185 Mon Sep 17 00:00:00 2001 From: "Michael.Taylor" Date: Sun, 9 Jan 2022 13:37:53 -0500 Subject: [PATCH] fix: remove unused code in organization model --- src/controllers/organization.controller.js | 14 -------------- src/models/organizations/organizations.model.js | 14 -------------- 2 files changed, 28 deletions(-) diff --git a/src/controllers/organization.controller.js b/src/controllers/organization.controller.js index 88ece8bc..071ea9d8 100644 --- a/src/controllers/organization.controller.js +++ b/src/controllers/organization.controller.js @@ -1,19 +1,5 @@ -import fs from 'fs'; import { Organization } from '../models/organizations'; -const loadFileIntoString = (path) => { - return new Promise((resolve, reject) => { - fs.readFile(path, (err, buff) => { - if (err) { - console.error(err); - return; - } - console.log(buff.toString()); - resolve(buff.toString()); - }); - }); -}; - export const findAll = async (req, res) => { return res.json({ ...(await Organization.getHomeOrg()), diff --git a/src/models/organizations/organizations.model.js b/src/models/organizations/organizations.model.js index a00d81f3..c0807184 100644 --- a/src/models/organizations/organizations.model.js +++ b/src/models/organizations/organizations.model.js @@ -1,25 +1,11 @@ 'use strict'; -import fs from 'fs'; import Sequelize from 'sequelize'; const { Model } = Sequelize; import { sequelize } from '../database'; import ModelTypes from './organizations.modeltypes.cjs'; -const loadFileIntoString = (path) => { - return new Promise((resolve, reject) => { - fs.readFile(path, (err, buff) => { - if (err) { - console.error(err); - return; - } - console.log(buff.toString()); - resolve(buff.toString()); - }); - }); -}; - class Organization extends Model { static async getHomeOrg() { return {