gocodebox / lifterlms-rest

LifterLMS REST API Feature Plugin
6 stars 7 forks source link

Enrollment (and content) endpoints should not 404 when no enrollments (or content) can be found #180

Open thomasplevy opened 4 years ago

thomasplevy commented 4 years ago

Mmm well no to me it meant that the enrollments did not exist, so it's my wrong understanding of the specs: BUG. Maybe the spec could be more "complete" if they said what was the actual resource that couldn't be found.

I did the same with:

they must be fixed then! Sorry!

Originally posted by @eri-trabiccolo in https://github.com/gocodebox/lifterlms-rest/issues/178#issuecomment-653159049

See related #178

The following endpoints must be updated to respond with a 200 (not a 404) when no enrollments (or content) are found:

eri-trabiccolo commented 4 years ago

related, but maybe they worth another ticket:

we never return a 404 here, we always return a validation error as the post_id was wrong: https://github.com/gocodebox/lifterlms-rest/blob/1.0.0-beta.14/includes/server/class-llms-rest-students-progress-controller.php#L528

eri-trabiccolo commented 4 years ago

@thomasplevy Can you help_with/validate the following too? https://developer.lifterlms.com/rest-api/#tag/Student-Enrollments too

thomasplevy commented 4 years ago

@thomasplevy Can you help_with/validate the following too? https://developer.lifterlms.com/rest-api/#tag/Student-Enrollments too

You are correct on the way all of these should be working