Browse Source

Fix unpermitted parameters warning when generating pagination URLs (#6995)

pull/4/head
Eugen Rochko 6 years ago
committed by GitHub
parent
commit
33513753b9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 17 additions and 17 deletions
  1. +1
    -1
      app/controllers/api/v1/accounts/follower_accounts_controller.rb
  2. +1
    -1
      app/controllers/api/v1/accounts/following_accounts_controller.rb
  3. +1
    -1
      app/controllers/api/v1/accounts/statuses_controller.rb
  4. +1
    -1
      app/controllers/api/v1/blocks_controller.rb
  5. +1
    -1
      app/controllers/api/v1/domain_blocks_controller.rb
  6. +1
    -1
      app/controllers/api/v1/favourites_controller.rb
  7. +1
    -1
      app/controllers/api/v1/follow_requests_controller.rb
  8. +1
    -1
      app/controllers/api/v1/lists/accounts_controller.rb
  9. +1
    -1
      app/controllers/api/v1/mutes_controller.rb
  10. +1
    -1
      app/controllers/api/v1/notifications_controller.rb
  11. +1
    -1
      app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb
  12. +1
    -1
      app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb
  13. +1
    -1
      app/controllers/api/v1/statuses_controller.rb
  14. +1
    -1
      app/controllers/api/v1/timelines/home_controller.rb
  15. +1
    -1
      app/controllers/api/v1/timelines/list_controller.rb
  16. +1
    -1
      app/controllers/api/v1/timelines/public_controller.rb
  17. +1
    -1
      app/controllers/api/v1/timelines/tag_controller.rb

+ 1
- 1
app/controllers/api/v1/accounts/follower_accounts_controller.rb View File

@ -63,6 +63,6 @@ class Api::V1::Accounts::FollowerAccountsController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit).merge(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
end

+ 1
- 1
app/controllers/api/v1/accounts/following_accounts_controller.rb View File

@ -63,6 +63,6 @@ class Api::V1::Accounts::FollowingAccountsController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit).merge(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
end

+ 1
- 1
app/controllers/api/v1/accounts/statuses_controller.rb View File

@ -69,7 +69,7 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit, :only_media, :exclude_replies).merge(core_params)
params.slice(:limit, :only_media, :exclude_replies).permit(:limit, :only_media, :exclude_replies).merge(core_params)
end
def insert_pagination_headers

+ 1
- 1
app/controllers/api/v1/blocks_controller.rb View File

@ -57,6 +57,6 @@ class Api::V1::BlocksController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit).merge(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
end

+ 1
- 1
app/controllers/api/v1/domain_blocks_controller.rb View File

@ -67,7 +67,7 @@ class Api::V1::DomainBlocksController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit).merge(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
def domain_block_params

+ 1
- 1
app/controllers/api/v1/favourites_controller.rb View File

@ -66,6 +66,6 @@ class Api::V1::FavouritesController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit).merge(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
end

+ 1
- 1
app/controllers/api/v1/follow_requests_controller.rb View File

@ -71,6 +71,6 @@ class Api::V1::FollowRequestsController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit).merge(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
end

+ 1
- 1
app/controllers/api/v1/lists/accounts_controller.rb View File

@ -88,7 +88,7 @@ class Api::V1::Lists::AccountsController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit).merge(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
def unlimited?

+ 1
- 1
app/controllers/api/v1/mutes_controller.rb View File

@ -59,6 +59,6 @@ class Api::V1::MutesController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit).merge(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
end

+ 1
- 1
app/controllers/api/v1/notifications_controller.rb View File

@ -82,6 +82,6 @@ class Api::V1::NotificationsController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit, exclude_types: []).merge(core_params)
params.slice(:limit, :exclude_types).permit(:limit, exclude_types: []).merge(core_params)
end
end

+ 1
- 1
app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb View File

@ -77,6 +77,6 @@ class Api::V1::Statuses::FavouritedByAccountsController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit).merge(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
end

+ 1
- 1
app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb View File

@ -74,6 +74,6 @@ class Api::V1::Statuses::RebloggedByAccountsController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit).merge(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
end

+ 1
- 1
app/controllers/api/v1/statuses_controller.rb View File

@ -76,7 +76,7 @@ class Api::V1::StatusesController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit).merge(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
def authorize_if_got_token

+ 1
- 1
app/controllers/api/v1/timelines/home_controller.rb View File

@ -43,7 +43,7 @@ class Api::V1::Timelines::HomeController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:local, :limit).merge(core_params)
params.slice(:local, :limit).permit(:local, :limit).merge(core_params)
end
def next_path

+ 1
- 1
app/controllers/api/v1/timelines/list_controller.rb View File

@ -45,7 +45,7 @@ class Api::V1::Timelines::ListController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:limit).merge(core_params)
params.slice(:limit).permit(:limit).merge(core_params)
end
def next_path

+ 1
- 1
app/controllers/api/v1/timelines/public_controller.rb View File

@ -45,7 +45,7 @@ class Api::V1::Timelines::PublicController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:local, :limit, :only_media).merge(core_params)
params.slice(:local, :limit, :only_media).permit(:local, :limit, :only_media).merge(core_params)
end
def next_path

+ 1
- 1
app/controllers/api/v1/timelines/tag_controller.rb View File

@ -54,7 +54,7 @@ class Api::V1::Timelines::TagController < Api::BaseController
end
def pagination_params(core_params)
params.permit(:local, :limit, :only_media).merge(core_params)
params.slice(:local, :limit, :only_media).permit(:local, :limit, :only_media).merge(core_params)
end
def next_path

Loading…
Cancel
Save