Skip to content

Commit

Permalink
feat: accept account.createdAt and account.signedUpAt properties
Browse files Browse the repository at this point in the history
  • Loading branch information
simonyangme authored and gr2m committed Oct 17, 2016
1 parent b8af919 commit 9cc4d2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/accounts/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ function addAccount (state, properties, options) {
type: 'user',
name: properties.username,
password: properties.password,
createdAt: properties.createdAt,
signedUpAt: properties.signedUpAt,
roles: [
'id:' + accountId
].concat(properties.roles || [])
Expand Down
4 changes: 4 additions & 0 deletions lib/utils/doc-to-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ function toAccount (doc, options) {

var username = doc.name
var roles = doc.roles
var createdAt = doc.createdAt
var signedUpAt = doc.signedUpAt
var account = {
id: accountId,
username: username,
createdAt: createdAt,
signedUpAt: signedUpAt,
roles: findCustomRoles(roles)
}

Expand Down

0 comments on commit 9cc4d2f

Please sign in to comment.