Changes: * Change the `expires_at` field to `duration`. * Make moderators choose from a fixed set of standard ban lengths, instead of allowing arbitrary ban lengths. * List `duration` in seconds in the /bans.json API. * Dump bans to BigQuery. Note that some old bans have a negative duration. This is because their expiration date was before their creation date, which is because in 2013 bans were migrated to Danbooru 2 and the original ban creation dates were lost.
9 lines
165 B
Ruby
9 lines
165 B
Ruby
FactoryBot.define do
|
|
factory(:ban) do |f|
|
|
banner :factory => :admin_user
|
|
user
|
|
reason {FFaker::Lorem.words.join(" ")}
|
|
duration { 1.week }
|
|
end
|
|
end
|