Skip to content

Commit e6ddb25

Browse files
committed
Add user creation date to API data
Fixes #1390
1 parent 1949171 commit e6ddb25

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/models/user.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ def favorite_script_set
205205

206206
def serializable_hash(options = nil)
207207
sleazy = options&.[](:sleazy)
208-
h = super({ only: [:id, :name] }.merge(options || {})).merge({
209-
url: Rails.application.routes.url_helpers.user_url(nil, self, **(sleazy ? { host: 'sleazyfork.org' } : {})),
210-
})
208+
h = super({ only: [:id, :name, :created_at] }.merge(options || {})).merge({
209+
url: Rails.application.routes.url_helpers.user_url(nil, self, **(sleazy ? { host: 'sleazyfork.org' } : {})),
210+
})
211211
# rename listable_scripts to scripts
212212
unless h['listable_scripts'].nil?
213213
h['scripts'] = h['listable_scripts']

0 commit comments

Comments
 (0)