utilities/handler-helper.js
function _addOne(
  ownerModel,
  ownerId,
  childModel,
  childId,
  associationName,
  payload,
  Log
) {
  let request = {
    params: { ownerId: ownerId, childId: childId },
    payload: payload
  }
  return _addOneHandler(
    ownerModel,
    ownerId,
    childModel,
    childId,
    associationName,
    request,
    Log
  )
}
function _addOne(
  ownerModel,
  ownerId,
  childModel,
  childId,
  associationName,
  payload,
  Log
) {
  let request = {
    params: { ownerId: ownerId, childId: childId },
    payload: payload
  }
  return _addOneHandler(
    ownerModel,
    ownerId,
    childModel,
    childId,
    associationName,
    request,
    Log
  )
}
function _addOne ( ownerModel , ownerId , childModel , childId , associationName , payload , Log ) { let request = { params : { ownerId : ownerId , childId : childId } , payload : payload } return _addOneHandler ( ownerModel , ownerId , childModel , childId , associationName , request , Log ) }
AddOne function exposed as a mongoose wrapper.
@param ownerModel: The model that is being added to.
@param ownerId: The id of the owner document.
@param childModel: The model that is being added.
@param childId: The id of the child document.
@param associationName: The name of the association from the ownerModel's perspective.
@param payload: An object containing an extra linking-model fields.
@param Log: A logging object
@returns {object} A promise returning true if the add succeeds.
@private
AddOne function exposed as a mongoose wrapper .