Add configuration attribute to GET /api/v1/instance (#16485)

List various values like file size limits and supported mime types
This commit is contained in:
Eugen Rochko 2021-07-10 17:58:41 +02:00
parent e1cf8d4d37
commit d5a50e9dfb
2 changed files with 30 additions and 2 deletions

View file

@ -2,7 +2,8 @@
class StatusLengthValidator < ActiveModel::Validator
MAX_CHARS = 500
URL_PLACEHOLDER = "\1#{'x' * 23}"
URL_PLACEHOLDER_CHARS = 23
URL_PLACEHOLDER = "\1#{'x' * URL_PLACEHOLDER_CHARS}"
def validate(status)
return unless status.local? && !status.reblog?