discourse/lib/tasks/api.rake

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
314 B
Ruby
Raw Normal View History

# frozen_string_literal: true
desc "generate a master api key with given description"
task "api_key:create_master", [:description] => :environment do |task, args|
raise "Supply a description for the key" if !args[:description]
api_key = ApiKey.create!(description: args[:description])
2013-09-10 02:02:26 -04:00
puts api_key.key
2013-09-10 02:02:26 -04:00
end