Skip to content

Commit

Permalink
feat: createdAt timestamp (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Sep 29, 2016
1 parent 04f23da commit 5906f0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/sign-up.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ function signUp (state, options) {
return Promise.reject(new Error('SignUp with profile data not yet implemented. Please see https://github.com/hoodiehq/hoodie-account-client/issues/11.'))
}

options.createdAt = get(state, 'account.createdAt')

return internals.request({
url: state.url + '/session/account',
method: 'PUT',
Expand Down
3 changes: 2 additions & 1 deletion utils/get-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ function getState (options) {

if (!state.account) {
state.account = {
id: options.id || generateId()
id: options.id || generateId(),
createdAt: new Date().toISOString()
}

saveAccount({
Expand Down

0 comments on commit 5906f0e

Please sign in to comment.