fix write path

pull/1537/head
Jade McGough 2017-05-24 03:14:26 -07:00
parent 4e7e562772
commit ce4e3a85a9
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import AJAX from 'src/utils/ajax'
export const writeData = (source, db, data) => {
return AJAX({
url: `${source.links.write$}?db=${db}`,
url: `${source.links.write}?db=${db}`,
method: 'POST',
data,
})

View File

@ -35,7 +35,7 @@ class WriteDataForm extends Component {
handleWrite() {
const {onClose, source, notify} = this.props
const {selectedDatabase} = this.state
writeData(source, selectedDatabase.text, this.editor.value).then(() => {
writeData(source, selectedDatabase, this.editor.value).then(() => {
notify('success', 'Data was written successfully')
onClose()
})