The code powering m.abunchtell.com https://m.abunchtell.com
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

31 строка
662 B

  1. # frozen_string_literal: true
  2. require_relative '../../config/boot'
  3. require_relative '../../config/environment'
  4. require_relative 'cli_helper'
  5. module Mastodon
  6. class RegistrationsCLI < Thor
  7. def self.exit_on_failure?
  8. true
  9. end
  10. desc 'open', 'Open registrations'
  11. def open
  12. Setting.open_registrations = true
  13. say('OK', :green)
  14. end
  15. desc 'close', 'Close registrations'
  16. def close
  17. Setting.open_registrations = false
  18. say('OK', :green)
  19. end
  20. end
  21. class SettingsCLI < Thor
  22. desc 'registrations SUBCOMMAND ...ARGS', 'Manage state of registrations'
  23. subcommand 'registrations', RegistrationsCLI
  24. end
  25. end