cleanup
This commit is contained in:
parent
3d79aafad9
commit
4ace7a3ea0
@ -8,7 +8,8 @@ class Home extends Endpoint {
|
|||||||
|
|
||||||
super(server, {
|
super(server, {
|
||||||
name: 'home',
|
name: 'home',
|
||||||
path: '/*'
|
path: '/*',
|
||||||
|
loadOrder: 10
|
||||||
});
|
});
|
||||||
|
|
||||||
this.methods = [
|
this.methods = [
|
||||||
|
@ -4,7 +4,8 @@ const { Util } = require('../../util');
|
|||||||
const UserApplicataion = require('./UserApplication');
|
const UserApplicataion = require('./UserApplication');
|
||||||
|
|
||||||
// Fields omitted in safeJson
|
// Fields omitted in safeJson
|
||||||
const ProtectedFields = [ '_id', '_otpSecret', '_passwordHash' ];
|
// Should be keys used in the json, not the ones defined in the constructor
|
||||||
|
const ProtectedFields = [ '_id', 'otpSecret', 'password' ];
|
||||||
|
|
||||||
class User {
|
class User {
|
||||||
|
|
||||||
@ -75,7 +76,7 @@ class User {
|
|||||||
this.cachedTimestamp = Date.now();
|
this.cachedTimestamp = Date.now();
|
||||||
this.createdTimestamp = data.createdTimestamp || Date.now();
|
this.createdTimestamp = data.createdTimestamp || Date.now();
|
||||||
|
|
||||||
this.avatarURL = data.avatarURL || null;
|
this.avatar = data.avatar || null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +181,7 @@ class User {
|
|||||||
applications: this._applications,
|
applications: this._applications,
|
||||||
createdTimestamp: this.createdTimestamp,
|
createdTimestamp: this.createdTimestamp,
|
||||||
disabled: this.disabled,
|
disabled: this.disabled,
|
||||||
avatarURL: this.avatarURL,
|
avatar: this.avatar,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user