API: Adding secret.text to the user-schema (#12121)

This commit is contained in:
negue
2020-05-02 19:59:05 +02:00
committed by GitHub
parent 643d3802cc
commit 26767f598b
17 changed files with 177 additions and 22 deletions

View File

@@ -502,3 +502,9 @@ schema.methods.toJSONWithInbox = async function userToJSONWithInbox () {
return toJSON;
};
schema.methods.getSecretData = function getSecretData () {
const user = this;
return user.secret;
};