gocodebox / lifterlms-rest

LifterLMS REST API Feature Plugin
6 stars 7 forks source link

Courses endpoint returns incorrect format for difficulties #338

Open brianhogg opened 3 months ago

brianhogg commented 3 months ago

Reproduction Steps

  1. Create a course with two or more difficulties
  2. Make an API call to /wp-json/llms/v1/courses

Expected Behavior

Difficulties is an array of integers as per the documentation

Actual Behavior

A string with a comma-separated list of integers is returned

Tech Notes

We may want to create a v2 of the endpoint with the fix so it won't break the code of anyone relying on the current incorrect format.

This issue has been recreated: