Skip to content

Commit

Permalink
fix: rename benefits
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeen committed Dec 2, 2021
1 parent f109292 commit 6d806c4
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import stub from './co-benifets.stub.json';
import stub from './co-benefits.stub.json';

export const CoBenifetsMock = {
export const CoBenefitsMock = {
findAll: () => stub,
findOne: (id) => {
return stub.find((record) => record.id == id);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

class CoBenifets {
class CoBenefits {
static list(page = 0, limit = 10) {
return stub;
}
}

export { CoBenifets };
export { CoBenefits };
2 changes: 2 additions & 0 deletions src/models/co-benefits/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './co-benefits.model.js';
export * from './co-benefits.mock.js';
2 changes: 0 additions & 2 deletions src/models/co-benifets/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/models/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './projects';
export * from './co-benifets';
export * from './co-benefits';
export * from './locations';
export * from './ratings';
export * from './qualifications';
Expand Down
4 changes: 2 additions & 2 deletions src/routes/v1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const V1Router = express.Router();
import {
ProjectRouter,
UnitRouter,
CoBenifetRouter,
CoBenefitRouter,
LocationRouter,
QualificationRouter,
RatingRouter,
Expand All @@ -16,7 +16,7 @@ import {

V1Router.use('/projects', ProjectRouter);
V1Router.use('/units', UnitRouter);
V1Router.use('/co-benifets', CoBenifetRouter);
V1Router.use('/co-benefits', CoBenefitRouter);
V1Router.use('/locations', LocationRouter);
V1Router.use('/qualifications', QualificationRouter);
V1Router.use('/ratings', RatingRouter);
Expand Down
12 changes: 6 additions & 6 deletions src/routes/v1/resources/co-benefits.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

import express from 'express';
import { CoBenefitController } from '../../../controllers';
const CoBenifetRouter = express.Router();
const CoBenefitRouter = express.Router();

CoBenifetRouter.get('/', (req, res) => {
CoBenefitRouter.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);
CoBenefitRouter.post('/', CoBenefitController.create);
CoBenefitRouter.put('/', CoBenefitController.update);
CoBenefitRouter.delete('/', CoBenefitController.destroy);

export { CoBenifetRouter };
export { CoBenefitRouter };

0 comments on commit 6d806c4

Please sign in to comment.