FIX: Exclude `UserAuthToken` and `UserAuthTokenLog` in user webhook.

This commit is contained in:
Guo Xiang Tan 2018-08-31 17:25:56 +08:00
parent ae2f00ee73
commit 5a214a687c
2 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,8 @@ class WebHookUserSerializer < UserSerializer
can_change_bio
user_api_keys
group_users
user_auth_tokens
user_auth_token_logs
}.each do |attr|
define_method("include_#{attr}?") do
false

View File

@ -21,7 +21,7 @@ RSpec.describe WebHookUserSerializer do
it 'should only include the required keys' do
count = serializer.as_json.keys.count
difference = count - 45
difference = count - 43
expect(difference).to eq(0), lambda {
message = ""