* fix: remove groups from UserRead model * fix: add missing system dependencies for postgres * fix: change vector db provider environment variable name * fix: WeaviateAdapter retrieve bug * fix: correctly return data point objects from retrieve method * fix: align graph object properties * feat: add node example
14 lines
384 B
JavaScript
14 lines
384 B
JavaScript
import nodeFetch from 'node-fetch';
|
|
import handleServerErrors from './handleServerErrors.js';
|
|
|
|
export default function fetch(url, options = {}, token) {
|
|
return nodeFetch('http://127.0.0.1:8000/api' + url, {
|
|
...options,
|
|
headers: {
|
|
...options.headers,
|
|
'Authorization': `Bearer ${token}`,
|
|
},
|
|
})
|
|
.then(handleServerErrors)
|
|
.catch(handleServerErrors);
|
|
}
|