summaryrefslogtreecommitdiff
path: root/RemoveTagDefinition.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2026-06-15 12:54:44 +1000
committerJake Mannens <jake@asger.xyz>2026-06-15 12:54:44 +1000
commitd36e27387eabf88845d364b9d3a2da54a583247f (patch)
tree716058aac0b72c1ec1bb0b7eb47d4e3a87926299 /RemoveTagDefinition.cs
parentab46387d4d02e30b171a7c2fa07947b41ec691a0 (diff)
Diffstat (limited to 'RemoveTagDefinition.cs')
-rw-r--r--RemoveTagDefinition.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/RemoveTagDefinition.cs b/RemoveTagDefinition.cs
index e28d7f9..b0d4a11 100644
--- a/RemoveTagDefinition.cs
+++ b/RemoveTagDefinition.cs
@@ -1,16 +1,17 @@
-using HyperBooru.ApiClient;
-using System.Management.Automation;
+using System.Management.Automation;
namespace HyperBooru.PowerShell;
[Alias("rhbtd")]
[Cmdlet(VerbsCommon.Remove, "HyperBooruTagDefinition")]
-public class RemoveTagDefinitionCmdlet : PSCmdlet {
- [Parameter(Mandatory = true)] public required HBSession Session { get; set; }
- [Parameter(Mandatory = true)] public required Guid TagDefinitionId { get; set; }
+public class RemoveTagDefinitionCmdlet : SessionCmdlet {
+ [Parameter(Mandatory = true)] public required Guid TagDefinitionId { get; set; }
- protected override void ProcessRecord() =>
+ protected override void ProcessRecord() {
Session.Tag.DeleteTagDefinitionAsync(TagDefinitionId)
.GetAwaiter()
.GetResult();
+
+ WriteVerbose($"Removed tag definition {TagDefinitionId.ToString().ToUpper()}");
+ }
}