mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Add tasks for open/close registration (#1823)
* Add tasks for open/close registration * Code climate style fix * Use true instead of string 'true'
This commit is contained in:
parent
f9d7ec8971
commit
e28a5aab08
@ -82,6 +82,22 @@ namespace :mastodon do
|
||||
end
|
||||
end
|
||||
|
||||
namespace :settings do
|
||||
desc 'Open registrations on this instance'
|
||||
task open_registrations: :environment do
|
||||
setting = Setting.where(var: 'open_registrations').first
|
||||
setting.value = true
|
||||
setting.save
|
||||
end
|
||||
|
||||
desc 'Close registrations on this instance'
|
||||
task close_registrations: :environment do
|
||||
setting = Setting.where(var: 'open_registrations').first
|
||||
setting.value = false
|
||||
setting.save
|
||||
end
|
||||
end
|
||||
|
||||
namespace :maintenance do
|
||||
desc 'Update counter caches'
|
||||
task update_counter_caches: :environment do
|
||||
|
Loading…
Reference in New Issue
Block a user