Merge branch 'main' into email
This commit is contained in:
commit
1fa981f205
|
|
@ -47,4 +47,5 @@ DRIBBBLE_CLIENT_ID=""
|
|||
DRIBBBLE_CLIENT_SECRET=""
|
||||
IS_GENERAL="true"
|
||||
EMAIL_FROM_ADDRESS=""
|
||||
EMAIL_FROM_NAME=""
|
||||
EMAIL_FROM_NAME=""
|
||||
NEXT_PUBLIC_POLOTNO="Polotno key for the gallery"
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue