- Update api routes, add DeprecatedEndpoint middleware. For more info, visit [pixelfed.org/kb/10404](https://pixelfed.org/kb/10404) ([a8453e77](https://github.com/pixelfed/pixelfed/commit/a8453e77))
<ahref="/{{$user->username}}"class="pr-2 text-muted small font-weight-bold"title="View Profile"data-toggle="tooltip"data-placement="bottom">
@ -75,6 +127,11 @@
<ahref="/i/admin/users/modtools/{{$user->id}}"class="pr-2 text-muted small font-weight-bold"title="Moderation Logs"data-toggle="tooltip"data-placement="bottom">
<ahref="/i/admin/users/delete/{{$user->id}}"class="pr-2 text-muted small font-weight-bold"title="Delete account"data-toggle="tooltip"data-placement="bottom"onclick="deleteAccount({{$user->id}})">
Delete
</a>
@endif
</span>
</td>
</tr>
@ -117,5 +174,20 @@
el.text(filesize(size, {round: 0}));
});
});
function deleteAccount(id) {
event.preventDefault();
if(!window.confirm('Are you sure you want to delete this account?')) {
return;
}
axios.post('/i/admin/users/delete/' + id)
.then(res => {
swal('Account Deleted', 'Successfully deleted this account! This page will refresh once you press OK.', 'success')