dbwebb-se / linux

Coursematerial for linux
Other
3 stars 2 forks source link

Maze - Should be more consistent #7

Closed litemerafrukt closed 7 years ago

litemerafrukt commented 8 years ago

If you try to enter the maze before you selected a map you get an answer with: text: "Map not selected" and response code 500. Would be more consistent with other errors if changed from "text" to "error".

foikila commented 8 years ago

Na, its more like "error" is the "index" that should be changed instead, regards to consistency. Its only used two times throughout the hole program: https://github.com/mosbth/linux/blob/master/example/nodejs/maze/maze.js#L269-L280

litemerafrukt commented 8 years ago

Ok :smile:

foikila commented 8 years ago

But we can change the "error" to "text" instead.

litemerafrukt commented 8 years ago

For consistency change response type to 'plain' on: https://github.com/mosbth/linux/blob/master/example/nodejs/maze/maze.js#L225

mosbth commented 7 years ago

I'll fix that.