mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-23 07:40:55 +01:00
a0579c90db
Before this change, invoking a non existing API method would return an HTTP/200 response with a JSON payload {"code":3,"message":"no such function"}. This commit changes the HTTP status code to 404, leaving the payload as-is. Before: curl --verbose "http://localhost:9001/api/1/notExisting?apikey=ABCDEF" < HTTP/1.1 200 OK < X-Powered-By: Express [...] {"code":3,"message":"no such function","data":null} After: curl --verbose "http://localhost:9001/api/1/notExisting?apikey=ABCDEF" < HTTP/1.1 404 OK < X-Powered-By: Express [...] {"code":3,"message":"no such function","data":null} Fixes #3546. |
||
---|---|---|
.. | ||
db | ||
eejs | ||
handler | ||
hooks | ||
utils | ||
easysync_tests.js | ||
padaccess.js | ||
README.md | ||
server.js | ||
stats.js |
About the folder structure
- db - all modules that are accessing the data structure and are communicating directly to the database
- handler - all modules that respond directly to requests/messages of the browser
- utils - helper modules
Module name conventions
Module file names start with a capital letter and uses camelCase
Where does it start?
server.js is started directly