fix: use spread syntax when updating groups in browser after edit

After editing a group, there would be no members in the group member list anymore. Turns out I was overwriting the member list when patching a group. oops.
This commit is contained in:
Spectralitree 2022-01-26 21:06:50 +01:00
parent 28b5f5bc1d
commit 6d2fa78767
3 changed files with 8 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -33,7 +33,7 @@
}(window.location))
</script>
<!-- End Single Page Apps for GitHub Pages -->
<script type="module" crossorigin src="/assets/main.a69c16ab.js"></script>
<script type="module" crossorigin src="/assets/main.1402b832.js"></script>
<link rel="modulepreload" href="/assets/vendor.30223de5.js">
<link rel="stylesheet" href="/assets/vendor.17033500.css">
<link rel="stylesheet" href="/assets/main.eae1741b.css">

View File

@ -42,7 +42,7 @@
const api = new PKAPI();
try {
let res = await api.patchGroup({token: localStorage.getItem("pk-token"), id: group.id, data: data});
group = res;
group = {...group, ...res};
err = [];
update();
editMode = false;