Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/creating-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ module.exports = function (mongoose) {

let collectionName = model.collectionDisplayName || model.modelName

Log.note("Generating Password Update endpoint for " + collectionName)
Log.info("Generating Password Update endpoint for " + collectionName)

let handler = async function (request, h) {
try {
Expand Down
2 changes: 1 addition & 1 deletion seed/user.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = function(mongoose) {

const collectionName = model.collectionDisplayName || model.modelName

Log.note('Generating Password Update endpoint for ' + collectionName)
Log.info('Generating Password Update endpoint for ' + collectionName)

const handler = async function(request, h) {
try {
Expand Down
20 changes: 10 additions & 10 deletions utilities/handler-helper-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function generateListHandler(model, options, logger) {

return async function(request, h) {
try {
Log.log(
Log.info(
'params(%s), query(%s), payload(%s)',
JSON.stringify(request.params),
JSON.stringify(request.query),
Expand Down Expand Up @@ -167,7 +167,7 @@ function generateFindHandler(model, options, logger) {

return async function(request, h) {
try {
Log.log(
Log.info(
'params(%s), query(%s), payload(%s)',
JSON.stringify(request.params),
JSON.stringify(request.query),
Expand Down Expand Up @@ -200,7 +200,7 @@ function generateCreateHandler(model, options, logger) {

return async function(request, h) {
try {
Log.log(
Log.info(
'params(%s), query(%s), payload(%s)',
JSON.stringify(request.params),
JSON.stringify(request.query),
Expand Down Expand Up @@ -228,7 +228,7 @@ function generateUpdateHandler(model, options, logger) {

return async function(request, h) {
try {
Log.log(
Log.info(
'params(%s), query(%s), payload(%s)',
JSON.stringify(request.params),
JSON.stringify(request.query),
Expand Down Expand Up @@ -261,7 +261,7 @@ function generateDeleteHandler(model, options, logger) {

return async function(request, h) {
try {
Log.log(
Log.info(
'params(%s), query(%s), payload(%s)',
JSON.stringify(request.params),
JSON.stringify(request.query),
Expand Down Expand Up @@ -310,7 +310,7 @@ function generateAssociationAddOneHandler(

return async function(request, h) {
try {
Log.log(
Log.info(
addMethodName + ' + params(%s), query(%s), payload(%s)',
JSON.stringify(request.params),
JSON.stringify(request.query),
Expand Down Expand Up @@ -357,7 +357,7 @@ function generateAssociationRemoveOneHandler(

return async function(request, h) {
try {
Log.log(
Log.info(
removeMethodName + ' + params(%s), query(%s), payload(%s)',
JSON.stringify(request.params),
JSON.stringify(request.query),
Expand Down Expand Up @@ -402,7 +402,7 @@ function generateAssociationAddManyHandler(

return async function(request, h) {
try {
Log.log(
Log.info(
addMethodName + ' + params(%s), query(%s), payload(%s)',
JSON.stringify(request.params),
JSON.stringify(request.query),
Expand Down Expand Up @@ -447,7 +447,7 @@ function generateAssociationRemoveManyHandler(

return async function(request, h) {
try {
Log.log(
Log.info(
removeMethodName + ' + params(%s), query(%s), payload(%s)',
JSON.stringify(request.params),
JSON.stringify(request.query),
Expand Down Expand Up @@ -492,7 +492,7 @@ function generateAssociationGetAllHandler(

return async function(request, h) {
try {
Log.log(
Log.info(
getAllMethodName + ' + params(%s), query(%s), payload(%s)',
JSON.stringify(request.params),
JSON.stringify(request.query),
Expand Down
6 changes: 3 additions & 3 deletions utilities/handler-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ async function _listHandler(model, request, Log) {
Log
).lean()
const result = await mongooseQuery.exec()
Log.log('Result: %s', JSON.stringify(result))
Log.note('Result: %s', JSON.stringify(result))
return result
}

Expand Down Expand Up @@ -218,7 +218,7 @@ async function _listHandler(model, request, Log) {
}
}

Log.log('Result: %s', JSON.stringify(result))
Log.note('Result: %s', JSON.stringify(result))
return result
})

Expand Down Expand Up @@ -404,7 +404,7 @@ async function _findHandler(model, _id, request, Log) {
}
}

Log.log('Result: %s', JSON.stringify(result))
Log.note('Result: %s', JSON.stringify(result))

return result
} else {
Expand Down
22 changes: 11 additions & 11 deletions utilities/rest-helper-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ module.exports = function(logger, mongoose, server) {
options = options || {}

if (config.logRoutes) {
Log.note('Generating List endpoint for ' + collectionName)
Log.info('Generating List endpoint for ' + collectionName)
}

let resourceAliasForRoute
Expand Down Expand Up @@ -280,7 +280,7 @@ module.exports = function(logger, mongoose, server) {

const collectionName = model.collectionDisplayName || model.modelName
if (config.logRoutes) {
Log.note('Generating Find endpoint for ' + collectionName)
Log.info('Generating Find endpoint for ' + collectionName)
}

let resourceAliasForRoute
Expand Down Expand Up @@ -407,7 +407,7 @@ module.exports = function(logger, mongoose, server) {

const collectionName = model.collectionDisplayName || model.modelName
if (config.logRoutes) {
Log.note('Generating Create endpoint for ' + collectionName)
Log.info('Generating Create endpoint for ' + collectionName)
}

options = options || {}
Expand Down Expand Up @@ -602,7 +602,7 @@ module.exports = function(logger, mongoose, server) {

const collectionName = model.collectionDisplayName || model.modelName
if (config.logRoutes) {
Log.note('Generating Delete One endpoint for ' + collectionName)
Log.info('Generating Delete One endpoint for ' + collectionName)
}

options = options || {}
Expand Down Expand Up @@ -738,7 +738,7 @@ module.exports = function(logger, mongoose, server) {

const collectionName = model.collectionDisplayName || model.modelName
if (config.logRoutes) {
Log.note('Generating Delete Many endpoint for ' + collectionName)
Log.info('Generating Delete Many endpoint for ' + collectionName)
}

options = options || {}
Expand Down Expand Up @@ -877,7 +877,7 @@ module.exports = function(logger, mongoose, server) {

const collectionName = model.collectionDisplayName || model.modelName
if (config.logRoutes) {
Log.note('Generating Update endpoint for ' + collectionName)
Log.info('Generating Update endpoint for ' + collectionName)
}

options = options || {}
Expand Down Expand Up @@ -1052,7 +1052,7 @@ module.exports = function(logger, mongoose, server) {
childModel.collectionDisplayName || childModel.modelName

if (config.logRoutes) {
Log.note(
Log.info(
'Generating addOne association endpoint for ' +
ownerModelName +
' -> ' +
Expand Down Expand Up @@ -1263,7 +1263,7 @@ module.exports = function(logger, mongoose, server) {
childModel.collectionDisplayName || childModel.modelName

if (config.logRoutes) {
Log.note(
Log.info(
'Generating removeOne association endpoint for ' +
ownerModelName +
' -> ' +
Expand Down Expand Up @@ -1456,7 +1456,7 @@ module.exports = function(logger, mongoose, server) {
childModel.collectionDisplayName || childModel.modelName

if (config.logRoutes) {
Log.note(
Log.info(
'Generating addMany association endpoint for ' +
ownerModelName +
' -> ' +
Expand Down Expand Up @@ -1674,7 +1674,7 @@ module.exports = function(logger, mongoose, server) {
childModel.collectionDisplayName || childModel.modelName

if (config.logRoutes) {
Log.note(
Log.info(
'Generating removeMany association endpoint for ' +
ownerModelName +
' -> ' +
Expand Down Expand Up @@ -1870,7 +1870,7 @@ module.exports = function(logger, mongoose, server) {
ownerModel.collectionDisplayName || ownerModel.modelName

if (config.logRoutes) {
Log.note(
Log.info(
'Generating list association endpoint for ' +
ownerModelName +
' -> ' +
Expand Down
Loading