mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-16 03:30:05 -05:00
rake task to generate api_key
This commit is contained in:
parent
3d9496f5d3
commit
279c3a3add
1 changed files with 8 additions and 0 deletions
8
lib/tasks/api.rake
Normal file
8
lib/tasks/api.rake
Normal file
|
@ -0,0 +1,8 @@
|
|||
desc "generate api key if missing, return existing if already there"
|
||||
task "api_key:get" => :environment do
|
||||
if SiteSetting.api_key.blank?
|
||||
SiteSetting.generate_api_key!
|
||||
end
|
||||
|
||||
puts SiteSetting.api_key
|
||||
end
|
Loading…
Reference in a new issue