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

structure changes #47

Open
seogram opened this issue Sep 2, 2017 · 8 comments
Open

structure changes #47

seogram opened this issue Sep 2, 2017 · 8 comments

Comments

@seogram
Copy link

seogram commented Sep 2, 2017

I do not have access to the result.issues;

.on('done', function(result) {

let  status = result.getResult();
if(status == 'success') {

      result = result.toJSON();
      let issues = result.issues;  ------->This was working before update but now is not accessible 
@seogram
Copy link
Author

seogram commented Sep 2, 2017

passmarked.getIssues({key: key }, function(err, issues) {
console.log(issues);

returns no issues , returns other functions instead

@Johanndutoit
Copy link
Contributor

Heya will address separately, for the first request. Mmmm that was not intended behavior, wonder where that came from. The properties should not be directly accessible just like that, rather throw the .get('issues') interface.

@Johanndutoit
Copy link
Contributor

Could you give .get('issues') a shot and see what it returns ?

@Johanndutoit
Copy link
Contributor

On the other problem, the list returned should be a list of our models that have various helper and util functions. So you can call .get() on all of them or other methods like the sample at https://github.com/passmarked/passmarked/blob/develop/samples/issues.js . Just makes the code a bit cleaner and easier on our side to swap out property names etc

@seogram
Copy link
Author

seogram commented Sep 2, 2017

It returns null

@seogram
Copy link
Author

seogram commented Sep 2, 2017

I thought both problem are same , because since the issue array is not exist or generated by API so causes those problems .

@Johanndutoit
Copy link
Contributor

MMm think we are missing each other somewhere here, could you pop over the piece of your code handling this? Should be able to see quite quickly :)

@seogram
Copy link
Author

seogram commented Sep 2, 2017

.on('done', function(result) {

let  status = result.getResult();


if(status == 'success') {
  console.log(result.get('issues'));

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

No branches or pull requests

2 participants