Merge branch 'master' of wopr.rodax-software.com:lqdvi/app2-api
This commit is contained in:
commit
426ddffa5f
@ -10,6 +10,7 @@ const SortMiddleware = require('../../middlewares/sort');
|
|||||||
|
|
||||||
//const entityValidation = require('./entity.validations');
|
//const entityValidation = require('./entity.validations');
|
||||||
const entityController = require('./entity.controller');
|
const entityController = require('./entity.controller');
|
||||||
|
const entityTypeController = require('./entity_type.controller');
|
||||||
|
|
||||||
|
|
||||||
const generalInvalidFields = [
|
const generalInvalidFields = [
|
||||||
@ -65,4 +66,14 @@ routes.get('/admin/entities/partners/:id',
|
|||||||
entityController.findOne(),
|
entityController.findOne(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
routes.get('/admin/entities/:id',
|
||||||
|
//isAdministratorUser,
|
||||||
|
entityController.findOne(),
|
||||||
|
);
|
||||||
|
|
||||||
|
routes.get('/admin/entitytypes/',
|
||||||
|
//isAdministratorUser,
|
||||||
|
entityTypeController.find(),
|
||||||
|
);
|
||||||
|
|
||||||
module.exports = routes;
|
module.exports = routes;
|
||||||
15
modules/entities/entity_type.controller.js
Normal file
15
modules/entities/entity_type.controller.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const generateControllers = require('../../core/controllers');
|
||||||
|
const entityTypeService = require('./entity_type.service');
|
||||||
|
const { extractParamsFromRequest, handleErrorResponse, handleResultResponse } = require('../../helpers/controller.helper');
|
||||||
|
|
||||||
|
// Module Name
|
||||||
|
const MODULE_NAME = '[entityType.controller]';
|
||||||
|
|
||||||
|
const controllerOptions = { MODULE_NAME };
|
||||||
|
const extraControllers = {
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = generateControllers(entityTypeService, extraControllers, controllerOptions);
|
||||||
|
|
||||||
11
modules/entities/entity_type.service.js
Normal file
11
modules/entities/entity_type.service.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/* global Venue */
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const _ = require('lodash');
|
||||||
|
const { generateService, parseParamsToFindOptions } = require('../../helpers/service.helper');
|
||||||
|
const models = require('../../core/models');
|
||||||
|
|
||||||
|
const extraMethods = {
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = generateService(models.EntityType, extraMethods);
|
||||||
Loading…
Reference in New Issue
Block a user