feat: add confirmation to pk;group remove -all

This commit is contained in:
rladenson 2024-10-19 17:08:25 -06:00
parent 1118d8bdf8
commit 229b17d630

View file

@ -123,6 +123,9 @@ public class GroupMember
toAction = members
.Where(m => existingMembersInGroup.Contains(m.Value))
.ToList();
if (ctx.MatchFlag("all", "a") && !await ctx.PromptYesNo($"Are you sure you want to remove all members from group {target.Reference(ctx)}?", "Empty Group")) throw Errors.GenericCancelled();
await ctx.Repository.RemoveMembersFromGroup(target.Id, toAction);
}
else