summaryrefslogtreecommitdiff
path: root/RemoveTagDefinition.cs
blob: c7eeddb2a3145afa1c93982ba12dbd37a2cd8f74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
using System.Management.Automation;

namespace HyperBooru.PowerShell;

[Alias("rhbtd")]
[Cmdlet(VerbsCommon.Remove, "HyperBooruTagDefinition")]
public class RemoveTagDefinitionCmdlet : SessionCmdlet {
    [Parameter(Mandatory = true)] public required Guid TagDefinitionId { get; set; }

    protected override void ProcessRecord() =>
        Session.Tag.DeleteTagDefinitionAsync(TagDefinitionId)
            .GetAwaiter()
            .GetResult();
}