kinto.js
kinto.js copied to clipboard
Document how to use custom endpoints
Users wondering if this is the correct way:
const client = new KintoClient(process.env.VUE_APP_API_URL)
const token = localStorage.getItem('token') ?? null
if (token) { client.setHeaders({ Authorization: `JWT ${token}` }) }
...
const path = endpoints.usermanual_info(uid)
client.execute({
path,
body: {
data,
permissions
},
method: 'POST',
headers: client._headers
})