diff --git a/src/controllers/co-benifet.controller.js b/src/controllers/co-benefit.controller.js similarity index 100% rename from src/controllers/co-benifet.controller.js rename to src/controllers/co-benefit.controller.js diff --git a/src/controllers/index.js b/src/controllers/index.js index d2894028..cc444420 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -1,5 +1,5 @@ import * as ProjectController from './project.controller'; -import * as CoBenifetController from './co-benifet.controller'; +import * as CoBenefitController from './co-benefit.controller'; import * as LocationController from './location.controller'; import * as RatingController from './rating.controller'; import * as QualificationController from './qualification.controller'; @@ -9,7 +9,7 @@ import * as VintageController from './vintages.controller'; export { ProjectController, - CoBenifetController, + CoBenefitController, LocationController, RatingController, QualificationController, diff --git a/src/models/co-benefits/co-benifets.mock.js b/src/models/co-benifets/co-benifets.mock.js similarity index 100% rename from src/models/co-benefits/co-benifets.mock.js rename to src/models/co-benifets/co-benifets.mock.js diff --git a/src/models/co-benefits/co-benifets.model.js b/src/models/co-benifets/co-benifets.model.js similarity index 100% rename from src/models/co-benefits/co-benifets.model.js rename to src/models/co-benifets/co-benifets.model.js diff --git a/src/models/co-benefits/co-benifets.stub.json b/src/models/co-benifets/co-benifets.stub.json similarity index 100% rename from src/models/co-benefits/co-benifets.stub.json rename to src/models/co-benifets/co-benifets.stub.json diff --git a/src/models/co-benefits/index.js b/src/models/co-benifets/index.js similarity index 100% rename from src/models/co-benefits/index.js rename to src/models/co-benifets/index.js diff --git a/src/models/index.js b/src/models/index.js index dae27e3f..e6d6d1c6 100644 --- a/src/models/index.js +++ b/src/models/index.js @@ -1,5 +1,5 @@ export * from './projects'; -export * from './co-benefits'; +export * from './co-benifets'; export * from './locations'; export * from './ratings'; export * from './qualifications'; diff --git a/src/models/units/units.model.js b/src/models/units/units.model.js index 66367f55..49a06208 100644 --- a/src/models/units/units.model.js +++ b/src/models/units/units.model.js @@ -1,6 +1,6 @@ 'use strict'; -import stub from './units.stub.json'; + class UnitModel { static list(page = 0, limit = 10) { diff --git a/src/routes/v1/resources/co-benefits.js b/src/routes/v1/resources/co-benefits.js new file mode 100644 index 00000000..b4ce19e3 --- /dev/null +++ b/src/routes/v1/resources/co-benefits.js @@ -0,0 +1,17 @@ +'use strict'; + +import express from 'express'; +import { CoBenefitController } from '../../../controllers'; +const CoBenifetRouter = express.Router(); + +CoBenifetRouter.get('/', (req, res) => { + return req.query.id + ? CoBenefitController.findOne(req, res) + : CoBenefitController.findAll(req, res); +}); + +CoBenifetRouter.post('/', CoBenefitController.create); +CoBenifetRouter.put('/', CoBenefitController.update); +CoBenifetRouter.delete('/', CoBenefitController.destroy); + +export { CoBenifetRouter }; diff --git a/src/routes/v1/resources/co-benifets.js b/src/routes/v1/resources/co-benifets.js deleted file mode 100644 index fc9ff2e6..00000000 --- a/src/routes/v1/resources/co-benifets.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -import express from 'express'; -import { CoBenifetController } from '../../../controllers'; -const CoBenifetRouter = express.Router(); - -CoBenifetRouter.get('/', (req, res) => { - return req.query.id - ? CoBenifetController.findOne(req, res) - : CoBenifetController.findAll(req, res); -}); - -CoBenifetRouter.post('/', CoBenifetController.create); -CoBenifetRouter.put('/', CoBenifetController.update); -CoBenifetRouter.delete('/', CoBenifetController.destroy); - -export { CoBenifetRouter }; diff --git a/src/routes/v1/resources/index.js b/src/routes/v1/resources/index.js index 030d0c86..683eea9a 100644 --- a/src/routes/v1/resources/index.js +++ b/src/routes/v1/resources/index.js @@ -5,4 +5,4 @@ export * from './qualifications'; export * from './ratings'; export * from './vintages'; export * from './related-projects'; -export * from './co-benifets'; +export * from './co-benefits';