function getSlotAttrs()

in custom-resources/lex-slot/index.js [97:117]


function getSlotAttrs (props, next) {
  const latestVersion = '$LATEST'
  const slotTypeParams = {
    name: props.name,
    version: latestVersion
  }
  console.log('Accessing current slot version with getSlotType: %j', slotTypeParams)
  LexModelBuildingService.getSlotType(slotTypeParams, function (err, slotTypeData) {
    if (err) {
      console.error('Problem accessing data during read to SlotType: %j', err)
      return next(err.code + ': ' + err.message)
    }
    console.log('Got SlotType information back: %j', slotTypeData)
    const slotTypeReplyAttrs = {
      checksum: slotTypeData.checksum,
      version: latestVersion
    }
    console.log('SlotType attributes: %j', slotTypeReplyAttrs)
    next(null, slotTypeReplyAttrs)
  })
}