hoodiehq-archive / hoodie-plugin-users

⛔ deprecated
Other
5 stars 9 forks source link

remove usage of couchr #35

Closed gr2m closed 9 years ago

gr2m commented 10 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); })
    }
gr2m commented 9 years ago

this is fixed via 2a8632b, but it's causing new issues ...

espy commented 9 years ago

Fixed in the new dashboard.