cartodb-4.42/lib/tasks/query_api_key.rake

9 lines
219 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
namespace :user do
desc 'Get the API key from a username'
task :query_api_key, [:username] => [:environment] do |task, args|
user = ::User.where(username: args[:username]).first
puts user.api_key
end
end