From ccaee4488ed5883482dd718f57ec4b870d6f6903 Mon Sep 17 00:00:00 2001 From: thenamesben Date: Wed, 7 Feb 2018 20:23:58 -0800 Subject: [PATCH] add default value for createdAt on account creation. followed suggestions from https://github.com/hoodiehq/hoodie-account-server-api/issues/66 --- lib/accounts/add.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/accounts/add.js b/lib/accounts/add.js index d90b3bd..3d7a331 100644 --- a/lib/accounts/add.js +++ b/lib/accounts/add.js @@ -39,7 +39,7 @@ function addAccount (state, properties, options) { type: 'user', name: lowercaseUsername, password: properties.password, - createdAt: properties.createdAt, + createdAt: properties.createdAt || new Date().toISOString(), signedUpAt: properties.signedUpAt, roles: [ 'id:' + accountId