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/CommandsService.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/CommandsService.js')
-rw-r--r-- | src/services/CommandsService.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/services/CommandsService.js b/src/services/CommandsService.js index cc5bdf2..181d50e 100644 --- a/src/services/CommandsService.js +++ b/src/services/CommandsService.js | |||
@@ -3,9 +3,9 @@ import ChatService from "./ChatService" | |||
3 | import store from "@/store/index.js" | 3 | import store from "@/store/index.js" |
4 | import router from '@/router/index.js' | 4 | import router from '@/router/index.js' |
5 | 5 | ||
6 | function set_groups(data) { | 6 | function set_groups(searcher, data) { |
7 | function group_command(group) { | 7 | function group_command(group) { |
8 | console.log(group) | 8 | searcher.$emit("group_set", group) |
9 | } | 9 | } |
10 | 10 | ||
11 | let groups = {} | 11 | let groups = {} |
@@ -21,11 +21,11 @@ function set_groups(data) { | |||
21 | export default { | 21 | export default { |
22 | groups() { | 22 | groups() { |
23 | return { | 23 | return { |
24 | async send() { | 24 | async send(searcher) { |
25 | const {data, status} = await ChatService.get_all_user_groups() | 25 | const {data, status} = await ChatService.get_all_user_groups() |
26 | if (status!==200) | 26 | if (status!==200) |
27 | return {} | 27 | return {} |
28 | const groups = set_groups(data) | 28 | const groups = set_groups(searcher, data) |
29 | return groups | 29 | return groups |
30 | }, | 30 | }, |
31 | 31 | ||