From ba84a670951cc292ad70824b5e4ba7be4dc071b8 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Tue, 7 Jan 2025 17:05:27 +0700 Subject: [PATCH] feat: delete post --- .../src/database/prisma/posts/posts.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts b/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts index 38a1cf687..d4320b6e8 100644 --- a/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts +++ b/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts @@ -505,7 +505,10 @@ export class PostsService { const post = await this._postRepository.deletePost(orgId, group); if (post?.id) { await this._workerServiceProducer.delete('post', post.id); + return {id: post.id}; } + + return {error: true}; } async countPostsFromDay(orgId: string, date: Date) {