Refaktoring verejneho profilu, pridani zobrazeni udalosti

This commit is contained in:
Michal Kváček
2023-10-14 22:43:16 +02:00
parent 5b47c56c6f
commit 4c8952117b
12 changed files with 228 additions and 49 deletions
+4 -4
View File
@@ -11,11 +11,11 @@ export const useEventsStore = defineStore('Events', {
}),
actions: {
fetchDetail(eventId) {
return apolloWrapper.query(EVENT_DETAIL, {id: eventId}).then(({data}) => data.event);
fetchDetail(eventId, username) {
return apolloWrapper.query(EVENT_DETAIL, {id: eventId, username: username}).then(({data}) => data.event);
},
fetch() {
return apolloWrapper.query(EVENTS_LIST).then(result => {
fetch(username) {
return apolloWrapper.query(EVENTS_LIST, {username}).then(result => {
this.items = result.data.events;
return result.data.events;
});