Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use the fullPage option of shutterbug #2423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading