diff --git a/lib/sign-up.js b/lib/sign-up.js index 8842249..993c6cb 100644 --- a/lib/sign-up.js +++ b/lib/sign-up.js @@ -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', diff --git a/utils/get-state.js b/utils/get-state.js index 7924d6c..7db7693 100644 --- a/utils/get-state.js +++ b/utils/get-state.js @@ -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({