Move emoji reaction limitation constraints
This commit is contained in:
parent
dcf52daa9b
commit
47bedd20ca
6 changed files with 21 additions and 5 deletions
|
@ -3,7 +3,6 @@
|
|||
class Api::BaseController < ApplicationController
|
||||
DEFAULT_STATUSES_LIMIT = 20
|
||||
DEFAULT_ACCOUNTS_LIMIT = 40
|
||||
DEFAULT_EMOJI_REACTION_LIMIT = 10
|
||||
|
||||
include RateLimitHeaders
|
||||
include AccessTokenTrackingConcern
|
||||
|
|
|
@ -42,7 +42,7 @@ class Api::V1::Statuses::EmojiReactionsController < Api::BaseController
|
|||
def create_private(emoji)
|
||||
count = EmojiReaction.where(account: current_account, status: @status).count
|
||||
|
||||
if count >= DEFAULT_EMOJI_REACTION_LIMIT
|
||||
if count >= EmojiReaction::EMOJI_REACTION_PER_ACCOUNT_LIMIT
|
||||
bad_request
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue