discourse/lib/tasks/api.rake

Failed to ignore revisions in .git-blame-ignore-revs.

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 01:02:26 -05:00
puts api_key.key
2013-09-10 01:02:26 -05:00
end