Wrap db:setup with Chewy.strategy(:mastodon) (#24302)

This commit is contained in:
Robert R George 2023-03-29 00:58:27 -07:00 committed by Claire
parent d25493e262
commit 520e9cc765
1 changed files with 10 additions and 8 deletions

View File

@ -1,3 +1,4 @@
Chewy.strategy(:mastodon) do
Doorkeeper::Application.create!(name: 'Web', superapp: true, redirect_uri: Doorkeeper.configuration.native_redirect_uri, scopes: 'read write follow push')
domain = ENV['LOCAL_DOMAIN'] || Rails.configuration.x.local_domain
@ -9,3 +10,4 @@ if Rails.env.development?
admin.save(validate: false)
User.where(email: "admin@#{domain}").first_or_initialize(email: "admin@#{domain}", password: 'mastodonadmin', password_confirmation: 'mastodonadmin', confirmed_at: Time.now.utc, admin: true, account: admin, agreement: true, approved: true).save!
end
end