Closed gr2m closed 9 years ago
use hoodieAdmin request instead, for getConfig / setConfig. Problem is that we use the bearer token instead of cookies, so request will fail with a 401
Here's how the appconfig plugin is doing it.
function getConfig(callback) { hoodieAdmin.request('GET', '/app/config') .fail(function(error) { callback(error); }) .done(function(response) { callback(null, response); }) } function setConfig(doc, callback) { hoodieAdmin.request('PUT', '/app/config', { data: JSON.stringify(doc) }) .fail(function(error) { callback(error); }) .done(function(response) { callback(null, response); }) }
this is fixed via 2a8632b, but it's causing new issues ...
Fixed in the new dashboard.
use hoodieAdmin request instead, for getConfig / setConfig. Problem is that we use the bearer token instead of cookies, so request will fail with a 401
Here's how the appconfig plugin is doing it.