src/controller.js
Function create
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const create = async (request, h) => {
const config = request.route.settings.plugins.hapiPgRestAPI
const repo = manager.get(config.name)
const { columns, data: payload } = await getRequestData(request, config)
Function updateOne
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateOne = async (request, h) => {
const config = request.route.settings.plugins.hapiPgRestAPI
const repo = manager.get(config.name)
const { columns, filter } = await getRequestData(request, config)
Avoid too many return
statements within this function. Open
Open
return errorReply(error, h)