diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2021-12-15 15:02:45 +0100 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2021-12-15 15:04:52 +0100 |
commit | 1f60c86c538cda423a82554fc15cb95d3ca6a1d8 (patch) | |
tree | 9fb8c14f4ac081cbed850058055bfd4a06e7d269 /src/services/ChatService.js | |
parent | 49379b11b8dfa179fd81398e8b4b5423c7275038 (diff) | |
download | lom_frontend-1f60c86c538cda423a82554fc15cb95d3ca6a1d8.tar.gz lom_frontend-1f60c86c538cda423a82554fc15cb95d3ca6a1d8.zip |
add Groups View and message fetcher
Diffstat (limited to 'src/services/ChatService.js')
-rw-r--r-- | src/services/ChatService.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/services/ChatService.js b/src/services/ChatService.js index 08deba2..d077e9b 100644 --- a/src/services/ChatService.js +++ b/src/services/ChatService.js | |||
@@ -13,7 +13,7 @@ export default { | |||
13 | } | 13 | } |
14 | }) | 14 | }) |
15 | .catch(error => error_notify(error)) | 15 | .catch(error => error_notify(error)) |
16 | }, | 16 | }, |
17 | 17 | ||
18 | async get_all_user_groups() { | 18 | async get_all_user_groups() { |
19 | return await axios | 19 | return await axios |
@@ -25,5 +25,17 @@ export default { | |||
25 | } | 25 | } |
26 | }) | 26 | }) |
27 | .catch(error => error_notify(error)) | 27 | .catch(error => error_notify(error)) |
28 | }, | ||
29 | |||
30 | async get_group_messages(group_pk) { | ||
31 | return await axios | ||
32 | .get(url+`groups/detail/${group_pk}/messages/`) | ||
33 | .then(res => { | ||
34 | return { | ||
35 | status: res.status, | ||
36 | data: res.data | ||
37 | } | ||
38 | }) | ||
39 | .catch(error => error_notify(error)) | ||
28 | } | 40 | } |
29 | } | 41 | } |