Skip to content

Commit

Permalink
Merge pull request #2423 from concord-consortium/188374303-use-shutte…
Browse files Browse the repository at this point in the history
…rbug-full-page

use the fullPage option of shutterbug
  • Loading branch information
scytacki authored Nov 19, 2024
2 parents a8cf9c7 + 4a9bd9f commit 12bd39c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/shutterbug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import fs from "fs";

const clueCodebase = "https://collaborative-learning.concord.org/branch/shutterbug-support";
// const clueCodebase = "http://localhost:8080";
// const clueCodebase = "https://reimagined-journey-v6q9774jwh6pr4-4000.app.github.dev/";

// const shutterbugServer = "https://api.concord.org/shutterbug-production";
// const shutterbugServer = "http://localhost:4000";
const shutterbugServer = "https://api.concord.org/shutterbug-staging";

function generateHtml(clueDocument: any) {
return `
Expand Down Expand Up @@ -43,9 +48,7 @@ function generateHtml(clueDocument: any) {
}

export async function postToShutterbug(body: any) {
const fetchURL = "https://api.concord.org/shutterbug-production";
console.log("Fetching", fetchURL);
const response = await fetch(fetchURL,
const response = await fetch(shutterbugServer,
{
method: "POST",
body: JSON.stringify(body)
Expand All @@ -65,7 +68,7 @@ const html = generateHtml(docObject);
if (outputHtml) {
fs.writeFileSync("shutterbug.html", html);
} else {
postToShutterbug({content: html, height: 1500});
postToShutterbug({content: html, height: 500, fullPage: true});
}
//

Expand Down

0 comments on commit 12bd39c

Please sign in to comment.