feat(members): implement /members page — Kachel-Ansicht (E2, issue #48) #58
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
const res = await fetch('/members/' + member.userId, {
|
const res = await fetch('/members/' + member.userId, {
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ role: newRole })
|
body: JSON.stringify({ role: newRole })
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -64,6 +65,9 @@
|
|||||||
const res = await fetch('/members/invites', { method: 'POST' });
|
const res = await fetch('/members/invites', { method: 'POST' });
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
activeInvite = await res.json();
|
activeInvite = await res.json();
|
||||||
|
} else {
|
||||||
|
showToast('Einladung konnte nicht erstellt werden');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
showInvitePanel = !showInvitePanel;
|
showInvitePanel = !showInvitePanel;
|
||||||
@@ -73,6 +77,8 @@
|
|||||||
const res = await fetch('/members/invites', { method: 'POST' });
|
const res = await fetch('/members/invites', { method: 'POST' });
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
activeInvite = await res.json();
|
activeInvite = await res.json();
|
||||||
|
} else {
|
||||||
|
showToast('Link konnte nicht erneuert werden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user