basic get&set of Map properties works

This commit is contained in:
Kevin Jahns
2015-06-29 13:20:19 +02:00
parent 8f63147dbc
commit bffbb6ca27
14 changed files with 146 additions and 56 deletions

View File

@@ -5,7 +5,8 @@ class AbstractConnector { //eslint-disable-line no-unused-vars
.role : String Role of this client ("master" or "slave")
.userId : String that uniquely defines the user.
*/
constructor (opts) {
constructor (y, opts) {
this.y = y;
if (opts == null){
opts = {};
}
@@ -23,7 +24,8 @@ class AbstractConnector { //eslint-disable-line no-unused-vars
this.currentSyncTarget = null;
}
setUserId (userId) {
this.os.setUserId(userId);
this.userId = userId;
this.y.db.setUserId(userId);
}
onUserEvent (f) {
this.userEventListeners.push(f);