From 9e04e46521a2580574caf0ede45229c0ef8df9ec Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 8 Oct 2024 09:23:30 -0400 Subject: [PATCH] Reference `IpBlock.severities` keys from CLI option check (#32291) --- lib/mastodon/cli/ip_blocks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/cli/ip_blocks.rb b/lib/mastodon/cli/ip_blocks.rb index 3c5fdb275..ef24f2e04 100644 --- a/lib/mastodon/cli/ip_blocks.rb +++ b/lib/mastodon/cli/ip_blocks.rb @@ -5,7 +5,7 @@ require_relative 'base' module Mastodon::CLI class IpBlocks < Base - option :severity, required: true, enum: %w(no_access sign_up_requires_approval sign_up_block), desc: 'Severity of the block' + option :severity, required: true, enum: IpBlock.severities.keys, desc: 'Severity of the block' option :comment, aliases: [:c], desc: 'Optional comment' option :duration, aliases: [:d], type: :numeric, desc: 'Duration of the block in seconds' option :force, type: :boolean, aliases: [:f], desc: 'Overwrite existing blocks'