about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authortrwnh <a@trwnh.com>2022-11-14 01:34:07 -0600
committerGitHub <noreply@github.com>2022-11-14 08:34:07 +0100
commitb59ce0a60ff4f90bb16a8c3338ad37218af052b8 (patch)
tree3a951a2fc21d3eaae75d455447a4d24476643881 /app
parent457c37e47ae51e09dfbfe687616415b3c8be13af (diff)
Move V2 Filter methods under /api/v2 prefix (#20622)
* Move V2 Filter methods under /api/v2 prefix

* move over the tests too
Diffstat (limited to 'app')
-rw-r--r--app/controllers/api/v2/filters/keywords_controller.rb (renamed from app/controllers/api/v1/filters/keywords_controller.rb)2
-rw-r--r--app/controllers/api/v2/filters/statuses_controller.rb (renamed from app/controllers/api/v1/filters/statuses_controller.rb)2
-rw-r--r--app/javascript/mastodon/actions/filters.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/api/v1/filters/keywords_controller.rb b/app/controllers/api/v2/filters/keywords_controller.rb
index d3718a137..c63e1d986 100644
--- a/app/controllers/api/v1/filters/keywords_controller.rb
+++ b/app/controllers/api/v2/filters/keywords_controller.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-class Api::V1::Filters::KeywordsController < Api::BaseController
+class Api::V2::Filters::KeywordsController < Api::BaseController
   before_action -> { doorkeeper_authorize! :read, :'read:filters' }, only: [:index, :show]
   before_action -> { doorkeeper_authorize! :write, :'write:filters' }, except: [:index, :show]
   before_action :require_user!
diff --git a/app/controllers/api/v1/filters/statuses_controller.rb b/app/controllers/api/v2/filters/statuses_controller.rb
index b6bed306f..755c14cff 100644
--- a/app/controllers/api/v1/filters/statuses_controller.rb
+++ b/app/controllers/api/v2/filters/statuses_controller.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-class Api::V1::Filters::StatusesController < Api::BaseController
+class Api::V2::Filters::StatusesController < Api::BaseController
   before_action -> { doorkeeper_authorize! :read, :'read:filters' }, only: [:index, :show]
   before_action -> { doorkeeper_authorize! :write, :'write:filters' }, except: [:index, :show]
   before_action :require_user!
diff --git a/app/javascript/mastodon/actions/filters.js b/app/javascript/mastodon/actions/filters.js
index 76326802e..e9c609fc8 100644
--- a/app/javascript/mastodon/actions/filters.js
+++ b/app/javascript/mastodon/actions/filters.js
@@ -43,7 +43,7 @@ export const fetchFilters = () => (dispatch, getState) => {
 export const createFilterStatus = (params, onSuccess, onFail) => (dispatch, getState) => {
   dispatch(createFilterStatusRequest());
 
-  api(getState).post(`/api/v1/filters/${params.filter_id}/statuses`, params).then(response => {
+  api(getState).post(`/api/v2/filters/${params.filter_id}/statuses`, params).then(response => {
     dispatch(createFilterStatusSuccess(response.data));
     if (onSuccess) onSuccess();
   }).catch(error => {