The application needs to add POST method handling to the /project route. The endpoint will be handed a JSON object that represents project configuration for a new project. For example:
POST {"title":"My Project"}
http://localhost:3001/project/
Then endpoint will do various bits of logic (TBD at a later time) and ultimately return a JSON Object representing a TPEN Project Entity.
This endpoint requires authentication and so will need to process a user and user permissions from the Authorization header's Bearer Token which came is as part of the request. If this header is not present or is invalid the endpoint should respond 401 Unauthorized.
This route will need CORS headers as described by #9.
Tests could include
Is the route registered with the app
Does the route process the existence and lack of the {id} section of the request
When there errors in the request pattern, are they caught and do they elicit a RESTful response
It is worth noting that we are not sure where project information will live. It may be in the TPEN static repository, it may be in its own MariaDB, it may be in RERUM or a sister instance of RERUM.
The application needs to add POST method handling to the /project route. The endpoint will be handed a JSON object that represents project configuration for a new project. For example:
Then endpoint will do various bits of logic (TBD at a later time) and ultimately return a JSON Object representing a TPEN Project Entity.
This endpoint requires authentication and so will need to process a user and user permissions from the Authorization header's Bearer Token which came is as part of the request. If this header is not present or is invalid the endpoint should respond 401 Unauthorized.
This route will need CORS headers as described by #9.
Tests could include