Fixed Type Issues
This commit is contained in:
@@ -5,9 +5,10 @@ import { constructAPIUrl } from "@/util/Utils";
|
||||
import { ReactNode, useEffect } from "react";
|
||||
import TableGen from "../../../client/TableGen";
|
||||
import PostTable from "@/components/client/admin/PostTable";
|
||||
import { deletePost, getPosts, updatePost } from "@/app/lib/actions/entityManagement/postActions";
|
||||
import { deletePost, getPostsWithBuckets, updatePost } from "@/app/lib/actions/entityManagement/postActions";
|
||||
import { getProjects } from "@/app/lib/actions/entityManagement/projectActions";
|
||||
import { Bucket, Project, Post, dbSync, Attachment } from "@/model/Models";
|
||||
import { tryCreateAttachment } from "@/app/api/attachment/route";
|
||||
|
||||
type Props = {
|
||||
children?:ReactNode
|
||||
@@ -29,9 +30,10 @@ export default async function PostView(props:Props){
|
||||
]
|
||||
const actions = {
|
||||
deletePost: deletePost,
|
||||
getPosts:getPosts, getProjects:
|
||||
getProjects,
|
||||
savePost:updatePost
|
||||
getPosts:getPostsWithBuckets,
|
||||
getProjects:getProjects,
|
||||
savePost:updatePost,
|
||||
// uploadAttachment:tryCreateAttachment
|
||||
};
|
||||
|
||||
const posts:Post[] = await Post.findAll({include: {model: Bucket, include: {model: Attachment}}}).then(posts=>posts.map((e)=>JSON.parse(JSON.stringify(e))));
|
||||
|
||||
Reference in New Issue
Block a user