This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/lib/tasks/api.rake

9 lines
219 B
Ruby
Raw Normal View History

2013-09-10 16:02:26 +10:00
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