[backend/razor] Add button to remove rule
This commit is contained in:
parent
d165af041c
commit
fc27572e38
2 changed files with 5 additions and 0 deletions
|
@ -34,6 +34,7 @@
|
|||
</td>
|
||||
<td>
|
||||
<NavLink href="@($"/admin/rules/{rule.Id}")">Edit</NavLink>
|
||||
<a class="fake-link" onclick="removeRule('@rule.Id', event.target)">Remove</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
|
|
@ -34,6 +34,10 @@ async function removeRelay(id, target) {
|
|||
await confirm(target, () => callApiMethod(`/api/iceshrimp/admin/relays/${id}`, 'DELETE'));
|
||||
}
|
||||
|
||||
async function removeRule(id, target) {
|
||||
await confirm(target, () => callApiMethod(`/api/iceshrimp/instance/rules/${id}`, 'DELETE'));
|
||||
}
|
||||
|
||||
async function suspendUser(id, target) {
|
||||
await confirm(target, () => callApiMethod(`/api/iceshrimp/moderation/users/${id}/suspend`));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue