diff --git a/apis/plans.go b/apis/plans.go index 2b40112..dc6942a 100644 --- a/apis/plans.go +++ b/apis/plans.go @@ -36,7 +36,7 @@ func listPlans(c *gin.Context) { if u == nil { return } - plans, err := u.ListPlans(db) + plans, err := u.GetPlans(db) if err == nil { c.JSON(http.StatusOK, plans) } else { diff --git a/core/users.go b/core/users.go index b863ec6..889e2fb 100644 --- a/core/users.go +++ b/core/users.go @@ -6,7 +6,7 @@ import ( "gorm.io/gorm" ) -func (u *User) ListPlans(orm *gorm.DB) ([]Plan, error) { +func (u *User) GetPlans(orm *gorm.DB) ([]Plan, error) { var plans []Plan err := orm.Debug().Table("plans p"). Select("p.*"). diff --git a/ui/src/main.ts b/ui/src/main.ts index 4b6c2fe..e182721 100644 --- a/ui/src/main.ts +++ b/ui/src/main.ts @@ -8,16 +8,7 @@ import router from './router'; import { library } from '@fortawesome/fontawesome-svg-core'; import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; -import { - faGear, - faPenToSquare, - faCheck, - faPlus, - faFloppyDisk, - faTrash, - faEye, - faXmark -} from '@fortawesome/free-solid-svg-icons'; +import { faGear, faPenToSquare, faCheck, faPlus, faFloppyDisk, faTrash, faEye } from '@fortawesome/free-solid-svg-icons'; library.add(faGear); library.add(faPenToSquare); @@ -26,7 +17,6 @@ library.add(faPlus); library.add(faFloppyDisk); library.add(faTrash); library.add(faEye); -library.add(faXmark); const app = createApp(App) diff --git a/ui/src/views/Plan.vue b/ui/src/views/Plan.vue index 7b5abd4..b26cfc3 100644 --- a/ui/src/views/Plan.vue +++ b/ui/src/views/Plan.vue @@ -14,10 +14,7 @@ const plan_name = ref(''); const organizer = ref(''); const description = ref(''); -const members = ref([]); const polls = ref([]); -const newPoll = ref(false); -const membersShown = ref(false); fetch('/api/plans/' + plan_id, { headers: { @@ -30,13 +27,6 @@ fetch('/api/plans/' + plan_id, { description.value = x.description; }) -fetch('/api/plans/' + plan_id + '/members', { - headers: { - 'Authorization': 'Basic ' + btoa(account.account + ':') - } -}).then(x => x.json()) - .then(x => members.value = x); - fetch('/api/plans/' + plan_id + '/polls', { headers: { 'Authorization': 'Basic ' + btoa(account.account + ':') @@ -45,22 +35,6 @@ fetch('/api/plans/' + plan_id + '/polls', { .then(x => { polls.value = x; }); - -function openDialog() { - newPoll.value = true; -} - -function closeDialog() { - newPoll.value = false; -} - -function showMembers() { - membersShown.value = true; -} - -function hideMembers() { - membersShown.value = false; -}