This commit is contained in:
Erik 2022-11-27 23:19:54 +02:00
parent 3d79aafad9
commit 4ace7a3ea0
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 6 additions and 4 deletions

View File

@ -8,7 +8,8 @@ class Home extends Endpoint {
super(server, { super(server, {
name: 'home', name: 'home',
path: '/*' path: '/*',
loadOrder: 10
}); });
this.methods = [ this.methods = [

View File

@ -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,
}; };
} }