Skip to content

Commit

Permalink
impl: bulk deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Pugma committed Jan 24, 2025
1 parent 41b6f6f commit 659d226
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/components/GroupManager/GroupMemberList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,8 @@ const onClickAdd = () => {
const onClickDeleteAll = async () => {
if (!confirm('本当に全メンバーを削除しますか?')) return
const ONCE = 10
try {
for (let i = 0; i < Math.ceil(props.members.length / ONCE); i++) {
await Promise.all(
props.members
.slice(i * ONCE, (i + 1) * ONCE)
.map(m => apis.removeUserGroupMember(props.groupId, m.id))
)
}
apis.removeUserGroupMembers(props.groupId)

Check warning on line 61 in src/components/GroupManager/GroupMemberList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/GroupManager/GroupMemberList.vue#L61

Added line #L61 was not covered by tests
} catch {
addErrorToast('全メンバーの削除に失敗しました')
}
Expand Down

0 comments on commit 659d226

Please sign in to comment.