diff options
author | Reverite <github@reverite.sh> | 2019-08-08 10:06:09 -0700 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-08-08 10:06:09 -0700 |
commit | 9528d3eda280ffac20a18c6f21bfc51f594e2c86 (patch) | |
tree | 0b6f5b980996b2d16c2dcdd5b932075812753098 /app/controllers/api/v1 | |
parent | 7a312a38f904e853f5703a0b678d0aec83fa858c (diff) | |
parent | aa485d6f055b93fd7a9df8b47ed96122b38af39e (diff) |
Merge branch 'glitch' into production
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r-- | app/controllers/api/v1/trends_controller.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/api/v1/trends_controller.rb b/app/controllers/api/v1/trends_controller.rb new file mode 100644 index 000000000..bcea9857e --- /dev/null +++ b/app/controllers/api/v1/trends_controller.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class Api::V1::TrendsController < Api::BaseController + before_action :set_tags + + respond_to :json + + def index + render json: @tags, each_serializer: REST::TagSerializer + end + + private + + def set_tags + @tags = TrendingTags.get(limit_param(10)) + end +end |