From e528319de0a0f45ea14b4be406bc2668c9113c5f Mon Sep 17 00:00:00 2001 From: Sean Sica <23294618+seansica@users.noreply.github.com> Date: Thu, 21 Dec 2023 12:48:01 -0500 Subject: [PATCH] Refactor ReferencesService: Change imported ReferencesRepository to lowercase referencesRepository to more accurately reflect the importation of an object/class instance as opposed to a class; Add repository argument to ReferencesService constructor and set this.repository accordingly --- app/services/references-service.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/services/references-service.js b/app/services/references-service.js index 5fb41603..5ef607be 100644 --- a/app/services/references-service.js +++ b/app/services/references-service.js @@ -1,12 +1,13 @@ 'use strict'; const baseService = require('./_base.service'); -const ReferencesRepository = require('../repository/references-repository'); +const referencesRepository = require('../repository/references-repository'); const { MissingParameterError } = require('../exceptions'); class ReferencesService { - constructor() { - this.repository = ReferencesRepository; + + constructor(repository) { + this.repository = repository; } async retrieveAll(options) { @@ -38,4 +39,4 @@ class ReferencesService { } } -module.exports = new ReferencesService(ReferencesRepository); \ No newline at end of file +module.exports = new ReferencesService(referencesRepository); \ No newline at end of file