diff --git a/app/repository/groups-repository.js b/app/repository/groups-repository.js new file mode 100644 index 00000000..616fa592 --- /dev/null +++ b/app/repository/groups-repository.js @@ -0,0 +1,14 @@ +'use strict'; + +const BaseRepository = require('./_base.repository'); +const Group = require('../models/group-model'); + +class GroupsRepository extends BaseRepository { + + constructor() { + super(Group); + + } +} + +module.exports = new GroupsRepository(); \ No newline at end of file diff --git a/app/services/tactics-service.js b/app/services/tactics-service.js index 5fd406bf..d2176a35 100644 --- a/app/services/tactics-service.js +++ b/app/services/tactics-service.js @@ -11,14 +11,7 @@ const config = require('../config/config'); const regexValidator = require('../lib/regex'); const {lastUpdatedByQueryHelper} = require('../lib/request-parameter-helper'); -const errors = { - missingParameter: 'Missing required parameter', - badlyFormattedParameter: 'Badly formatted parameter', - duplicateId: 'Duplicate id', - notFound: 'Document not found', - invalidQueryStringParameter: 'Invalid query string parameter' -}; -exports.errors = errors; +const { BadlyFormattedParameterError, DuplicateIdError, NotFoundError, InvalidQueryStringParameterError, MissingParameterError } = require('../exceptions'); const BaseService = require('./_base.service'); const TacticsRepository = require('../repository/tactics-repository');