ADD: metadata when user created

This commit is contained in:
igor
2018-12-10 12:39:54 +00:00
parent d1de8cf447
commit 1aa9827e1c
3 changed files with 6 additions and 1 deletions

View File

@@ -71,6 +71,10 @@ export class User {
await this._saveUserToDatabase();
}
async saveMetadata(metadata) {
return await this._redis.set('metadata_for_' + this._userid, JSON.stringify(metadata));
}
async loadByLoginAndPassword(login, password) {
let userid = await this._redis.get('user_' + login + '_' + this._hash(password));