bibleapi / bibleapi-rest

Node.js based Bible API RESTful web service
http://www.bibleapi.ws
MIT License
49 stars 12 forks source link

Fix verse range request when verses are in mixed order #10

Open rkazakov opened 8 years ago

rkazakov commented 8 years ago

Fix verse range request when verses are in mixed order. This is a really strange bug!

Run this request once: http://localhost:4000/api/v1/Matt3:5-2 Response: verse 2

Run request again: http://localhost:4000/api/v1/Matt3:5-2 Response: verse 5

I think the correct response in this case should be verse 5. So the logic is: When the verse range is incorrect (first verse is bigger then the second) ignore the second and return just the first verse. So in the case about should be verse 5 only.