aboutsummaryrefslogtreecommitdiffstats
path: root/src/web
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-12-29 15:08:36 -0600
committerJP Dillingham <jp@dillingham.me>2022-12-29 15:08:36 -0600
commit9176bbb14ee35e4bc12c5ff947fcf8bdbf2bb090 (patch)
treed60a0b847ba2c1fe9ba964d53c0ff901ea26f173 /src/web
parent53a5418c47f85e330e10ae853b25a1a163553df4 (diff)
downloadslskd-9176bbb14ee35e4bc12c5ff947fcf8bdbf2bb090.tar.gz
add get()
Diffstat (limited to 'src/web')
-rw-r--r--src/web/src/lib/chat.js4
1 files changed, 4 insertions, 0 deletions
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)}`);
};