The code powering m.abunchtell.com https://m.abunchtell.com
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

31 lignes
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