This commit is contained in:
10
action.mjs
10
action.mjs
@@ -17,21 +17,21 @@ class CreateListmonkCampaign {
|
|||||||
|
|
||||||
let imageUrl = postData.slice(postData.indexOf("](/") + 3);
|
let imageUrl = postData.slice(postData.indexOf("](/") + 3);
|
||||||
imageUrl = imageUrl.slice(0, imageUrl.indexOf(")"));
|
imageUrl = imageUrl.slice(0, imageUrl.indexOf(")"));
|
||||||
imageUrl = `https://blog.thorup.us/${imageUrl}`;
|
imageUrl = `https://blog.xn--trupgrd-exae.com/${imageUrl}`;
|
||||||
|
|
||||||
let contentBody = `
|
let contentBody = `
|
||||||
<h1>${title}</h1>
|
<h1>${title}</h1>
|
||||||
<a href="https://blog.thorup.us@TrackLink">
|
<a href="https://blog.xn--trupgrd-exae.com@TrackLink">
|
||||||
<img src=\"${imageUrl}\">
|
<img src=\"${imageUrl}\">
|
||||||
</a>
|
</a>
|
||||||
<a class="button" href="https://blog.thorup.us@TrackLink">View Post</a>
|
<a class="button" href="https://blog.xn--trupgrd-exae.com@TrackLink">View Post</a>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
let createRequestBody = {
|
let createRequestBody = {
|
||||||
name: title,
|
name: title,
|
||||||
subject: "New Post",
|
subject: "New Post",
|
||||||
lists: [process.env.INPUT_IS_PRODUCTION == "true" ? 3 : 4],
|
lists: [process.env.INPUT_IS_PRODUCTION == "true" ? 3 : 4],
|
||||||
from_email: "Thorup Family Mailer <mailer@thorup.us>",
|
from_email: "T Mailer <mailer@tarupgard.com>",
|
||||||
content_type: "html",
|
content_type: "html",
|
||||||
type: "regular",
|
type: "regular",
|
||||||
template_id: 1,
|
template_id: 1,
|
||||||
@@ -50,7 +50,7 @@ class CreateListmonkCampaign {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let createResponse = await fetch(
|
let createResponse = await fetch(
|
||||||
"https://mailer.thorup.us/api/campaigns",
|
"https://mailer.tarupgard.com/api/campaigns",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: requestHeaders,
|
headers: requestHeaders,
|
||||||
|
|||||||
Reference in New Issue
Block a user