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, {
name: 'home',
path: '/*'
path: '/*',
loadOrder: 10
});
this.methods = [

View File

@ -4,7 +4,8 @@ const { Util } = require('../../util');
const UserApplicataion = require('./UserApplication');
// 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 {
@ -75,7 +76,7 @@ class User {
this.cachedTimestamp = 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,
createdTimestamp: this.createdTimestamp,
disabled: this.disabled,
avatarURL: this.avatarURL,
avatar: this.avatar,
};
}