mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 06:46:03 +00:00
Adding getters to debugging support of Realm.Sync.User (#1892)
This commit is contained in:
parent
77026c7a19
commit
9a37726012
@ -19,6 +19,7 @@ X.Y.Z Release notes
|
||||
### Internals
|
||||
* Upgraded to Realm Core v5.6.3.
|
||||
* Upgraded to Realm Sync v3.5.8.
|
||||
* Added properties of `Realm.Sync.User` to debugger support.
|
||||
* Fixed class names in API documentation.
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
import { createUser as createUserRPC, _adminUser as _adminUserRPC, getAllUsers as getAllUsersRPC, _getExistingUser as _getExistingUserRPC } from './rpc';
|
||||
import { keys, objectTypes } from './constants';
|
||||
import { createMethods } from './util';
|
||||
import { getterForProperty, createMethods } from './util';
|
||||
|
||||
export default class User {
|
||||
static createUser(server, identity, token, isAdminToken, isAdminUser) {
|
||||
@ -39,7 +39,13 @@ export default class User {
|
||||
static _getExistingUser(server, identity) {
|
||||
return _getExistingUserRPC(Array.from(arguments));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Object.defineProperties(User.prototype, {
|
||||
token: { get: getterForProperty('token') },
|
||||
server: { get: getterForProperty('server') },
|
||||
identity: { get: getterForProperty('identity') },
|
||||
});
|
||||
|
||||
createMethods(User.prototype, objectTypes.USER, [
|
||||
'_logout',
|
||||
|
Loading…
x
Reference in New Issue
Block a user