Send proper content to writeLineProtocol

pull/1647/head
Andrew Watkins 2017-06-21 15:35:15 -07:00
parent abfee72b04
commit 42c0c9e497
1 changed files with 4 additions and 2 deletions

View File

@ -53,9 +53,11 @@ class WriteDataForm extends Component {
async handleSubmit() {
const {onClose, source, writeLineProtocol} = this.props
const {inputContent, selectedDatabase} = this.state
const {inputContent, uploadContent, selectedDatabase, isManual} = this.state
const content = isManual ? inputContent : uploadContent
try {
await writeLineProtocol(source, selectedDatabase, inputContent)
await writeLineProtocol(source, selectedDatabase, content)
onClose()
} catch (error) {
console.error(error.data.error)