in api/src/main/scala/com/gu/adapters/store/Store.scala [121:133]
def put(table: String, avatar: Avatar): Either[Error, Avatar] = {
val item = new Item()
.withPrimaryKey("AvatarId", avatar.id)
.withNumber("UserId", avatar.userId.toInt)
.withString("OriginalFilename", avatar.originalFilename)
.withString("Status", avatar.status.asString)
.withString("CreatedAt", ISODateFormatter.print(avatar.createdAt))
.withString("LastModified", ISODateFormatter.print(avatar.lastModified))
.withBoolean("IsSocial", avatar.isSocial)
.withBoolean("IsActive", avatar.isActive)
handleIoErrors(db.getTable(table).putItem(item)) map (_ => avatar)
}