import { Context } from "koa"; import { CollectionItem } from "sealious"; import { tempstream } from "tempstream"; import { Posts } from "../collections/collections"; import html from "../html"; import { SealiousItemListPage, BaseListPageFields } from "@sealcode/sealgen"; export const actionName = "ListPosts"; const filterFields = {}; export default new (class ListPostsPage extends SealiousItemListPage< typeof Posts, typeof BaseListPageFields > { fields = BaseListPageFields; filterFields = filterFields; filterControls = []; async render(ctx: Context) { return html( ctx, "Posts", tempstream/* HTML */ `
id | ${Object.keys(Posts.fields).map( (fieldname) => `${fieldname} | ` )} ${super.render(ctx)}
---|