diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-12-29 15:08:36 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-12-29 15:08:36 -0600 |
| commit | 9176bbb14ee35e4bc12c5ff947fcf8bdbf2bb090 (patch) | |
| tree | d60a0b847ba2c1fe9ba964d53c0ff901ea26f173 /src | |
| parent | 53a5418c47f85e330e10ae853b25a1a163553df4 (diff) | |
| download | slskd-9176bbb14ee35e4bc12c5ff947fcf8bdbf2bb090.tar.gz | |
add get()
Diffstat (limited to 'src')
| -rw-r--r-- | src/web/src/lib/chat.js | 4 |
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)}`); }; |
