From c12cefc61960e987f570c3e4bec82a40999d9915 Mon Sep 17 00:00:00 2001 From: noellabo Date: Sun, 5 Mar 2023 12:36:16 +0900 Subject: [PATCH] Fix view threads in Mastodon app --- .../api/v1/statuses/histories_controller.rb | 11 +++++++++++ config/routes.rb | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 app/controllers/api/v1/statuses/histories_controller.rb diff --git a/app/controllers/api/v1/statuses/histories_controller.rb b/app/controllers/api/v1/statuses/histories_controller.rb new file mode 100644 index 000000000..e52cc5d61 --- /dev/null +++ b/app/controllers/api/v1/statuses/histories_controller.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class Api::V1::Statuses::HistoriesController < Api::BaseController + include Authorization + + before_action -> { authorize_if_got_token! :read, :'read:statuses' } + + def show + render json: [], status: 200 + end +end diff --git a/config/routes.rb b/config/routes.rb index 0f38e5ee4..276121a6e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -368,6 +368,8 @@ Rails.application.routes.draw do resources :emoji_reactions, only: :update, constraints: { id: /[^\/]+/ } post :emoji_unreaction, to: 'emoji_reactions#destroy' + + resource :history, only: :show end member do