Ghost/test/unit
naz cbdc91ce48
Added Location header to API's POST request responses (#12186)
refs #2635

- Adds 'Location' header to endpoints which create new resources and have corresponding `GET` endpoint as speced in JSON API - https://jsonapi.org/format/#crud-creating-responses-201. Specifically:
    /posts/
    /pages/
    /integrations/
    /tags/
    /members/
    /labels/
    /notifications/
    /invites/

- Adding the header should allow for better resource discoverability and improved logging readability
- Added `url` property to the frame constructor. Data in `url` should give enough information  to later build up the `Location` header URL for created resource.
- Added Location header to headers handler. The Location value is built up from a combination of request URL and the id that is present in the response for the resource. The header is automatically added to requests coming to `add` controller methods which return `id` property in the frame result
- Excluded Webhooks API  as there is no "GET" endpoint available to fetch the resource
2020-09-14 22:33:37 +12:00
..
adapters Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
api Added Location header to API's POST request responses (#12186) 2020-09-14 22:33:37 +12:00
apps 🐛 Fixed private blogging exposing 404 and robots (#11922) 2020-06-16 11:42:32 +01:00
data Fixed regression test for integrity check 2020-09-10 12:57:03 +12:00
helpers Updated tests that were stubbing old ghost_head/ghost_foot settings keys 2020-07-01 17:58:12 +01:00
lib Extracted promise libs and history into @tryghost/promise 2020-08-11 18:44:21 +01:00
models Skipped separate count query in .findPage() for limit="all" requests 2020-08-27 01:09:07 +01:00
server 🐛 Readded missing server.start event 2020-08-11 10:09:24 +01:00
services Extracted core/server/lib/security to @tryghost/security package 2020-08-11 14:06:50 +01:00
shared/config Updated tests locations and added linting of core/shared (#11872) 2020-06-01 22:06:50 +01:00
web Replaced constants file with @tryghost/constants 2020-08-11 12:51:16 +01:00