Sails version:1.0
Node version:9.5.0
NPM version:5.6
DB adapter name: N/A
DB adapter version: N/A
Operating system:macOS High Sierra 10.13.1
change to:
customToJSON: ()=> {
// Return a shallow copy of this record with the password removed.
return _.omit(this, ['password'])
}
didn't work
THKS
Hi @TxOne! It looks like you missed a step or two when you created your issue. Please edit your comment (use the pencil icon at the top-right corner of the comment box) and fix the following:
As soon as those items are rectified, post a new comment (e.g. “Ok, fixed!”) below and we'll take a look. Thanks!
*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]
Hi @TxOne !
Any more details regarding your error ?
You can provide the the error log when you do sails lift.
Cheers !
@TxOne @Paskalouis
Arrow functions do not provide access to this, which is probably why the code above doesn't work
(would be cool at some point for some code in Sails core to run at lift-time and check each of the configured functions to provide better error messages about this...)
Hi @mikermcneil
Do you mean when sails lift, sails checking each controller if there is function written like this on this ?
EDIT:
I think the information is still vague. I tried on Sails v0.12.4 does not show any error.
Need more info regarding this from @TxOne.