Skip to content

Commit

Permalink
fix: axios error
Browse files Browse the repository at this point in the history
  • Loading branch information
akvlad committed Apr 12, 2024
1 parent 18dadf5 commit be689b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/db/clickhouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,12 @@ const rawRequest = async (query, data, database, config) => {
(data ? `query=${encodeURIComponent(query)}` : null)
].filter(p => p)
const url = `${getClickhouseUrl()}/${getParams.length ? `?${getParams.join('&')}` : ''}`
return await axios.post(url, data || query, config)
const config = {
method: 'post',
url: url,
data: data || query
}
return await axios(config)
} catch (e) {
logger.error('rawRequest error: ' + query)
e.response?.data && logger.error(e.response.data.toString())
Expand Down

0 comments on commit be689b2

Please sign in to comment.