Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: delete post

Nevo Davidd055e693357b
diff --git a/apps/backend/src/public-api/routes/v1/public.integrations.controller.ts b/apps/backend/src/public-api/routes/v1/public.integrations.controller.ts
index 2655f699b..7f310b0cb 100644
--- a/apps/backend/src/public-api/routes/v1/public.integrations.controller.ts
+++ b/apps/backend/src/public-api/routes/v1/public.integrations.controller.ts
@@ -137,13 +137,22 @@ export class PublicIntegrationsController {
@Delete('/posts/:id')
async deletePost(
@GetOrgFromRequest() org: Organization,
- @Param() body: { id: string }
+ @Param('id') id: string
) {
Sentry.metrics.count("public_api-request", 1);
- const getPostById = await this._postsService.getPost(org.id, body.id);
+ const getPostById = await this._postsService.getPost(org.id, id);
return this._postsService.deletePost(org.id, getPostById.group);
}
+ @Delete('/posts/group/:group')
+ deletePostByGroup(
+ @GetOrgFromRequest() org: Organization,
+ @Param('group') group: string
+ ) {
+ Sentry.metrics.count("public_api-request", 1);
+ return this._postsService.deletePost(org.id, group);
+ }
+
@Get('/is-connected')
async getActiveIntegrations(@GetOrgFromRequest() org: Organization) {
Sentry.metrics.count("public_api-request", 1);