diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-01-06 18:08:06 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-01-06 18:08:06 +0100 |
commit | 90528f43bc988bac8c8280e917531f7505027570 (patch) | |
tree | 6143b81902af21aff93a1dc40b2a2eff3593735b /app/serializers/rest | |
parent | 225c934a1b66e2fcbedbda7936666c1ca3c9a04b (diff) | |
parent | 69763b6385250902fdb329d030457159976f70ed (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `config/webpack/configuration.js`: Upstream updated the `js-yaml` dependency, which changed how to call it. Those changes conflicted because that code is pretty different in glitch-soc which has to deal with its more complex theming system. Proceeded to the same compatibility changes in glitch-soc's code. - `package.json` and `yarn.lock`: Not really a conflict, just glitch-soc-specific dependencies textually too close to some dependencies updated upstream.
Diffstat (limited to 'app/serializers/rest')
-rw-r--r-- | app/serializers/rest/account_featured_tag_serializer.rb | 15 | ||||
-rw-r--r-- | app/serializers/rest/featured_tag_serializer.rb | 8 |
2 files changed, 7 insertions, 16 deletions
diff --git a/app/serializers/rest/account_featured_tag_serializer.rb b/app/serializers/rest/account_featured_tag_serializer.rb deleted file mode 100644 index 84bef2e62..000000000 --- a/app/serializers/rest/account_featured_tag_serializer.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class REST::AccountFeaturedTagSerializer < ActiveModel::Serializer - include RoutingHelper - - attributes :id, :name, :url - - def id - object.tag.id.to_s - end - - def url - short_account_tag_url(object.account, object.tag) - end -end diff --git a/app/serializers/rest/featured_tag_serializer.rb b/app/serializers/rest/featured_tag_serializer.rb index 08121ff16..96adcc7d0 100644 --- a/app/serializers/rest/featured_tag_serializer.rb +++ b/app/serializers/rest/featured_tag_serializer.rb @@ -1,9 +1,15 @@ # frozen_string_literal: true class REST::FeaturedTagSerializer < ActiveModel::Serializer - attributes :id, :name, :statuses_count, :last_status_at + include RoutingHelper + + attributes :id, :name, :url, :statuses_count, :last_status_at def id object.id.to_s end + + def url + short_account_tag_url(object.account, object.tag) + end end |