diff --git a/public/queries.json b/public/queries.json index 8d47aab..e69de29 100644 --- a/public/queries.json +++ b/public/queries.json @@ -1,47 +0,0 @@ -{ - "query": "select * from invoices", - "chart": { - "data": [ - { - "type": "scatter", - "mode": "lines", - "x": null, - "xsrc": "InvoiceId", - "meta": { - "columnNames": { - "x": "InvoiceId", - "y": "Total" - } - }, - "y": null, - "ysrc": "Total" - } - ], - "layout": { - "xaxis": { - "range": [ - 1, - 412 - ], - "autorange": true, - "type": "linear" - }, - "yaxis": { - "range": [ - -0.39166666666666683, - 27.241666666666667 - ], - "autorange": true, - "type": "linear" - }, - "autosize": true, - "mapbox": { - "style": "open-street-map" - } - }, - "frames": [] - }, - "name": "Invoices", - "id": "ieZfcITwDUTADwOmQlYyL", - "createdAt": "2020-11-03T14:17:49.524Z" -} \ No newline at end of file diff --git a/src/views/MainView.vue b/src/views/MainView.vue index 508a5cc..804a8b8 100644 --- a/src/views/MainView.vue +++ b/src/views/MainView.vue @@ -29,7 +29,7 @@ export default { xhr.onload = () => { if (xhr.readyState === 4) { if (xhr.status === 200) { - resolve(JSON.parse(xhr.responseText)) + resolve(JSON.parse(xhr.responseText || '[]')) } else { reject(xhr.statusText) }