add function for connect VK login to user

parent c77585ce
...@@ -57,6 +57,9 @@ module.exports = function (User) { ...@@ -57,6 +57,9 @@ module.exports = function (User) {
return dbUtils.dbCreateItem(User, newUser); return dbUtils.dbCreateItem(User, newUser);
}, },
addVKLogin : function (userId,socialId) {
return dbUtils.dbFindOneAndUpdate(User, {_id : userId}, {vk_login : socialId});
},
changeUserAccountType : function (userId, accountType) { changeUserAccountType : function (userId, accountType) {
return dbUtils.dbFindOneAndUpdate(User, {_id : userId}, {accountType : accountType}); return dbUtils.dbFindOneAndUpdate(User, {_id : userId}, {accountType : accountType});
}, },
......
{ {
"name": "mirera-db", "name": "mirera-db",
"version": "1.5.1", "version": "1.5.2",
"description": "DB utils for mirera program testing server", "description": "DB utils for mirera program testing server",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment