diff --git a/src/app/lib/actions/entityManagement/postActions.ts b/src/app/lib/actions/entityManagement/postActions.ts index e296048..d7574d2 100644 --- a/src/app/lib/actions/entityManagement/postActions.ts +++ b/src/app/lib/actions/entityManagement/postActions.ts @@ -23,7 +23,7 @@ export async function deletePost(postID: number): Promise> export async function getPosts(): Promise[]>> { await dbSync; if(! await userIsAdmin()) return {error:"Unauthorized, not fetching Posts."} - const posts = await Post.findAll({include: {association: Post.associations.postBuckets, include: Bucket.associations.attachments}},); + const posts = await Post.findAll({include: {association: Post.associations.buckets, include: Bucket.associations.attachments}},); return {result:JSON.parse(JSON.stringify(posts))}; } diff --git a/src/model/Post.ts b/src/model/Post.ts index f1514e0..e519dc8 100644 --- a/src/model/Post.ts +++ b/src/model/Post.ts @@ -67,7 +67,7 @@ export class Post extends Model, InferCreationAttributes

; project: Association; - postBuckets: Association + buckets: Association postTags: Association; };