Add client.cacheUser method (#548)

* Add client.cacheUser method

* Fixed ESLint issues

* Added existence check first
This commit is contained in:
Schuyler Cebulskie
2016-08-27 10:22:07 -04:00
committed by Amish Shah
parent e47f3dda94
commit f944dce5c7
5 changed files with 43 additions and 4 deletions

View File

@@ -0,0 +1,15 @@
const Action = require('./Action');
class UserGetAction extends Action {
handle(data) {
const client = this.client;
const user = client.dataManager.newUser(data);
return {
user,
};
}
}
module.exports = UserGetAction;