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

allow supplying images JSON directly as "collection" POST data #33

Merged
merged 4 commits into from
Dec 6, 2019

Conversation

jywarren
Copy link
Member

@jywarren jywarren commented Dec 5, 2019

console.log("Export endpoint hit for url " + url);
require("axios").get(url).then(redirectToProcess);
} else { // supplying JSON for images directly:
redirectToProcess(req.query.collection);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have to parse the JSON, right?

@jywarren
Copy link
Member Author

jywarren commented Dec 6, 2019

Great! Let's add a test with some json!

describe('/GET /ap1/v2/export', () => {

@jywarren
Copy link
Member Author

jywarren commented Dec 6, 2019

Modified in response to this; although the test did not fail?

(node:36) UnhandledPromiseRejectionWarning: ReferenceError: url is not defined
    at redirectToProcess (/app/src/api/v2/index.js:28:72)

@jywarren jywarren merged commit d0f325c into main Dec 6, 2019
@jywarren
Copy link
Member Author

jywarren commented Dec 6, 2019

The new test worked, as far as I can see! #34 will help but merging for now.

@jywarren
Copy link
Member Author

jywarren commented Dec 6, 2019

Ah, oops! I need to bump the version number. New PR.

@jywarren
Copy link
Member Author

jywarren commented Dec 6, 2019

Published v1.1.0 in 08435b5

@jywarren jywarren mentioned this pull request Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accept GET/POST param for warpables json instead of a URL
1 participant