Skip to content

Commit

Permalink
Refactor ReferencesService: Change imported ReferencesRepository to l…
Browse files Browse the repository at this point in the history
…owercase 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
  • Loading branch information
seansica committed Dec 21, 2023
1 parent 0e43da9 commit e528319
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/services/references-service.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down Expand Up @@ -38,4 +39,4 @@ class ReferencesService {
}
}

module.exports = new ReferencesService(ReferencesRepository);
module.exports = new ReferencesService(referencesRepository);

0 comments on commit e528319

Please sign in to comment.