Created
July 13, 2016 17:52
-
-
Save itsravenous/0b094bff34c420136966257fa06a4d64 to your computer and use it in GitHub Desktop.
Resaving incomplete classification results in GET, not PUT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const api = require('panoptes-client/lib/api-client'); | |
const auth = require('panoptes-client/lib/auth'); | |
const credentials = { | |
login: process.env.PANOPTES_USER, | |
password: process.env.PANOPTES_PASSWORD, | |
} | |
auth.signIn(credentials) | |
.then(() => { | |
return api.type('classifications/incomplete').get(); | |
}) | |
.then(classifications => { | |
return classifications[0].save(); // GET https://panoptes-staging.zooniverse.org/api/classifications/<id> | |
}) | |
.catch(console.error); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment