mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
API: Adding secret.text to the user-schema (#12121)
This commit is contained in:
@@ -502,3 +502,9 @@ schema.methods.toJSONWithInbox = async function userToJSONWithInbox () {
|
||||
|
||||
return toJSON;
|
||||
};
|
||||
|
||||
schema.methods.getSecretData = function getSecretData () {
|
||||
const user = this;
|
||||
|
||||
return user.secret;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user