I am trying to use the function user.getStudentsInfo() to get the students info and then iterate through the students using
user.getStudentsInfo().then((students) => { students.forEach((info) => { console.log(info.student.currentGPA); }) })
But when ran, the console returns Couldn't login PowerSchool user: TypeError: user.getStudentsInfo is not a function
In your test.js file, this is the function used to get the student info. I continue to look through your API and I notice that getStudentsInfo() is in fact there in the User model file. Then I try using the getStudentsInfo() function (plural students) and I get TypeError: data.assignmentScores.map is not a function Is there something wrong with the API, as this previously worked for me.
I am trying to use the function
user.getStudentsInfo()to get the students info and then iterate through the students usinguser.getStudentsInfo().then((students) => { students.forEach((info) => { console.log(info.student.currentGPA); }) })But when ran, the console returns
Couldn't login PowerSchool user: TypeError: user.getStudentsInfo is not a functionIn your test.js file, this is the function used to get the student info. I continue to look through your API and I notice that
getStudentsInfo()is in fact there in the User model file. Then I try using thegetStudentsInfo()function (plural students) and I getTypeError: data.assignmentScores.map is not a functionIs there something wrong with the API, as this previously worked for me.