fix write path
parent
4e7e562772
commit
ce4e3a85a9
|
@ -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,
|
||||
})
|
||||
|
|
|
@ -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()
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue