From 54a62a3ff06fc132b3ea8506efbce06c5e0869fe Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Sat, 12 Oct 2024 14:02:16 -0400 Subject: Initial invite accept UI --- ui/lib/apiServer.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ui/lib/apiServer.js') 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); -- cgit v1.2.3