diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-12 14:02:16 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-12 14:02:16 -0400 |
| commit | 54a62a3ff06fc132b3ea8506efbce06c5e0869fe (patch) | |
| tree | cbf79697814d2aede080dd7a88c1a41b32825fe5 /ui/lib/apiServer.js | |
| parent | 756863f298f9e4277863f9e8758e253c5ae95923 (diff) | |
Initial invite accept UI
Diffstat (limited to 'ui/lib/apiServer.js')
| -rw-r--r-- | ui/lib/apiServer.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/lib/apiServer.js b/ui/lib/apiServer.js index 76ecb87..3910dab 100644 --- a/ui/lib/apiServer.js +++ b/ui/lib/apiServer.js @@ -42,6 +42,18 @@ export async function deleteMessage(messageId) { // TODO } +export async function getInvite(inviteId) { + return apiServer.get(`/invite/${inviteId}`); +} + +export async function acceptInvite(inviteId, username, password) { + const data = { + name: username, + password, + }; + return apiServer.post(`/invite/${inviteId}`, data); +} + export function subscribeToEvents(resume_point) { const eventsUrl = new URL('/api/events', window.location); eventsUrl.searchParams.append('resume_point', resume_point); |
