diff --git a/.env.example b/.env.example index 9485cfa5..d06208b6 100644 --- a/.env.example +++ b/.env.example @@ -47,4 +47,5 @@ DRIBBBLE_CLIENT_ID="" DRIBBBLE_CLIENT_SECRET="" IS_GENERAL="true" EMAIL_FROM_ADDRESS="" -EMAIL_FROM_NAME="" \ No newline at end of file +EMAIL_FROM_NAME="" +NEXT_PUBLIC_POLOTNO="Polotno key for the gallery" diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index cfed2253..ffd4b7ac 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,5 +1,5 @@ name: "🐛 Bug Report" -description: "Submit a bug report to help us improve" +description: "Submit a bug report to help us improve,\nif you have a problem installing the app please join our https://discord.postiz.com instead for help." title: "🐛 Bug Report: " labels: ["type: bug"] body: diff --git a/apps/frontend/src/components/launches/polonto.tsx b/apps/frontend/src/components/launches/polonto.tsx index bb0e61a7..d80eb48d 100644 --- a/apps/frontend/src/components/launches/polonto.tsx +++ b/apps/frontend/src/components/launches/polonto.tsx @@ -19,7 +19,7 @@ import { PictureGeneratorSection } from '@gitroom/frontend/components/launches/p import { useUser } from '@gitroom/frontend/components/layout/user.context'; const store = createStore({ - key: 'Aqml_02mqf6YTKC0jYZ8', + key: process.env.NEXT_PUBLIC_POLOTNO!, showCredit: false, }); diff --git a/libraries/nestjs-libraries/src/integrations/social/reddit.provider.ts b/libraries/nestjs-libraries/src/integrations/social/reddit.provider.ts index 7cd21e6c..fc76de1e 100644 --- a/libraries/nestjs-libraries/src/integrations/social/reddit.provider.ts +++ b/libraries/nestjs-libraries/src/integrations/social/reddit.provider.ts @@ -124,6 +124,34 @@ export class RedditProvider extends SocialAbstract implements SocialProvider { const valueArray: PostResponse[] = []; for (const firstPostSettings of post.settings.subreddit) { + const postData = { + api_type: 'json', + title: firstPostSettings.value.title || '', + kind: + firstPostSettings.value.type === 'media' + ? 'image' + : firstPostSettings.value.type, + ...(firstPostSettings.value.flair + ? { flair_id: firstPostSettings.value.flair.id } + : {}), + ...(firstPostSettings.value.type === 'link' + ? { + url: firstPostSettings.value.url, + } + : {}), + ...(firstPostSettings.value.type === 'media' + ? { + url: `${ + firstPostSettings.value.media[0].path.indexOf('http') === -1 + ? `${process.env.NEXT_PUBLIC_BACKEND_URL}/${process.env.NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY}` + : `` + }${firstPostSettings.value.media[0].path}`, + } + : {}), + text: post.message, + sr: firstPostSettings.value.subreddit, + }; + const { json: { data: { id, name, url }, @@ -135,33 +163,7 @@ export class RedditProvider extends SocialAbstract implements SocialProvider { Authorization: `Bearer ${accessToken}`, 'Content-Type': 'application/x-www-form-urlencoded', }, - body: new URLSearchParams({ - api_type: 'json', - title: firstPostSettings.value.type, - kind: - firstPostSettings.value.type === 'media' - ? 'image' - : firstPostSettings.value.type, - ...(firstPostSettings.value.flair - ? { flair_id: firstPostSettings.value.flair.id } - : {}), - ...(firstPostSettings.value.type === 'link' - ? { - url: firstPostSettings.value.url, - } - : {}), - ...(firstPostSettings.value.type === 'media' - ? { - url: `${ - firstPostSettings.value.media[0].path.indexOf('http') === -1 - ? `${process.env.NEXT_PUBLIC_BACKEND_URL}/${process.env.NEXT_PUBLIC_UPLOAD_STATIC_DIRECTORY}` - : `` - }${firstPostSettings.value.media[0].path}`, - } - : {}), - text: post.message, - sr: firstPostSettings.value.subreddit, - }), + body: new URLSearchParams(postData), }) ).json();