Verified Commit 797f3378 authored by Jakob Moser's avatar Jakob Moser
Browse files

Name singleton object as if it were an object

parent c6931d8d
Loading
Loading
Loading
Loading
+3 −3
Changes for portal/static/js/components/pages/Fachschaftssitzung.mjs: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
import { Base } from "./Base.mjs"
import { Agenda } from "../pieces/Agenda.mjs"

const Items = {
const items = {
    all: null,
    async fetch() {
        this.all = await m.request("/api/v0/agendas/-/items")
@@ -13,12 +13,12 @@ export const Fachschaftssitzung = {
        document.title = "Fachschaftssitzung · FS Coli Portal"
    },
    oninit() {
        Items.fetch()
        items.fetch()
    },
    view() {
        return m(Base, [
            m(Agenda, {
                items: Items.all?.map(item => item.name),
                items: items.all?.map(item => item.name),
            }),
        ])
    },