Replies: 3 comments 9 replies
-
@Dearest-U , you don't need to modify the source code for this. you could use the |
Beta Was this translation helpful? Give feedback.
-
But when I call the 20230817 17:45:21.483423 6879 ERROR error:1 status:1 - MysqlConnection.cc:243 From the log, it can be seen that during the insert execution, all fields in the database table that cannot be null should have appeared in the SQL statement; However, the field set to an empty string in the |
Beta Was this translation helpful? Give feedback.
-
Yes, the masqueradingVector will affect both the read and write operations of the database. According to your needs, if you want to hide the "pwd" field only when outputting, a more reasonable approach is to do it within the Custom controller. You should modify the response you receive in the callback of the method from the corresponding Base controller. Remove the "pwd" field from the JSON. |
Beta Was this translation helpful? Give feedback.
-
When using the restful API controller, all fields of the database will be returned by default. But certain fields do not need to be returned, such as the user's password. Modifying the source code of the controller base class can certainly be implemented, but how can a response filter be implemented without modifying the source code to achieve this function?
Another meaning is how to do some unified processing before the response returns?
Beta Was this translation helpful? Give feedback.
All reactions