Skip to content

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

fix: reddit settings type only accepts self, link, media

Gilad Resisi5d3acd768a6b
diff --git a/apps/frontend/src/components/new-launch/providers/reddit/subreddit.tsx b/apps/frontend/src/components/new-launch/providers/reddit/subreddit.tsx
index c3bdd53ff..ae3b2d5a4 100644
--- a/apps/frontend/src/components/new-launch/providers/reddit/subreddit.tsx
+++ b/apps/frontend/src/components/new-launch/providers/reddit/subreddit.tsx
@@ -90,6 +90,7 @@ export const Subreddit: FC<{
...restrictions,
type: restrictions.allow[0],
media: [],
+ url: '',
},
},
});
diff --git a/libraries/nestjs-libraries/src/dtos/posts/providers-settings/reddit.dto.ts b/libraries/nestjs-libraries/src/dtos/posts/providers-settings/reddit.dto.ts
index 4a8f2a13f..f4d4d813c 100644
--- a/libraries/nestjs-libraries/src/dtos/posts/providers-settings/reddit.dto.ts
+++ b/libraries/nestjs-libraries/src/dtos/posts/providers-settings/reddit.dto.ts
@@ -2,6 +2,7 @@ import {
ArrayMinSize,
IsBoolean,
IsDefined,
+ IsIn,
IsString,
IsUrl,
Matches,
@@ -37,10 +38,11 @@ export class RedditSettingsDtoInner {
title: string;
@IsString()
- @MinLength(2)
+ @IsIn(['self', 'link', 'media'])
@IsDefined()
@JSONSchema({
- description: 'Must be any of link, self (normal post), image, video, videogif',
+ description:
+ "Must be one of self (text post), link (requires url), media (uploads the post's first attached image or mp4 video)",
})
type: string;