Skip to content

Releases: hoodiehq/hoodie-account-server-api

v2.2.0

17 Oct 00:21
Compare
Choose a tag to compare

<a name"2.2.0">

2.2.0 (2016-10-17)

Features

  • accept account.createdAt and account.signedUpAt properties (9cc4d2fd)

v2.1.1

16 Oct 21:15
Compare
Choose a tag to compare

<a name"2.1.1">

2.1.1 (2016-10-16)

Bug Fixes

v2.1.0

16 Oct 20:52
Compare
Choose a tag to compare

<a name"2.1.0">

2.1.0 (2016-10-16)

Features

v2.0.0

15 Oct 05:58
Compare
Choose a tag to compare

<a name"2.0.0">

2.0.0 (2016-10-15)

Features

Breaking Changes

  • Before, options.db had to be passed to the Api constructor, pre-initialised with "pouchdb-users":
var AccountApi = require("@hoodie/account-server-api")
var PouchDB = require("pouchdb")

PouchDB.plugin(require("pouchdb-users"))

var db = new PouchDB("http://localhost:5984/_users")

db.installUsersBehavior().then(function () {
  var api = new AccountApi({
    db: db,
    secret: "secret123"
  })

  api.accounts.findAll().then(logAccountStats)
  api.accounts.on("change", logAccountChange)
})

Now, options.PouchDB is enough. Optionally options.usersDb for a custom users db name can be passed (it defaults to _users):

var AccountApi = require("@hoodie/account-server-api")
var PouchDB = require("pouchdb")
  .plugin(require("pouchdb-users"))

var api = new AccountApi({
  PouchDB: PouchDB,
  usersDb: "my-users-db",
  secret: "secret123"
})

(e18d4c4c)

v1.0.0

15 Oct 04:51
Compare
Choose a tag to compare

<a name"1.0.0">

1.0.0 (2016-10-15)

Features