From 9176bbb14ee35e4bc12c5ff947fcf8bdbf2bb090 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 29 Dec 2022 15:08:36 -0600 Subject: add get() --- src/web/src/lib/chat.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/web') diff --git a/src/web/src/lib/chat.js b/src/web/src/lib/chat.js index 2b31bcd8..31edcc8b 100644 --- a/src/web/src/lib/chat.js +++ b/src/web/src/lib/chat.js @@ -4,6 +4,10 @@ export const getAll = async () => { return (await api.get('/conversations')).data; }; +export const get = async ({ username }) => { + return (await api.get(`/conversations/${encodeURIComponent(username)}`)).data; +}; + export const acknowledge = ({ username }) => { return api.put(`/conversations/${encodeURIComponent(username)}`); }; -- cgit v1.2.3