Closed aejgardner closed 3 years ago
Action:
Result:
Instead of the app crashing due to unprocessable entity, the below error is shown:
Action:
Bearer token has been added to the header of the request.
Result:
200 - OK: API now approves access and loads main page with code 200.
Commit: https://github.com/develop-me/bagajob/commit/201f10d8c076628ff3c3c7c042550c7c56917daf
Action:
useEffect
function that clears authResponse
on component loadauthResponse
as <p>
element below formResult:
Feedback is given to user while loading, and when email is sent - instructing them to check their inbox.
Commit: https://github.com/develop-me/bagajob/pull/42/commits/55630843d1a5c240161331762018bed7dedafe9a
Action:
use-query-params
and query-string
npm packages<QueryParamProvider ReactRouterRoute={Route}>
Result:
{email: "email@email.com", password: "newpassword", token: "tokenstring47HFD98SJNFUIhki93"}
Commits https://github.com/develop-me/bagajob/pull/42/commits/3a0938cecb37a54388c621b722b3193f2eb3ef7d https://github.com/develop-me/bagajob/pull/42/commits/fe2857b9a0d84667a245b30efaa334e02709c9cb
Action:
api/home/logout
Result:
Visiting api/home/logout
and clicking "Log Out" now clears state and prompts user to return to login
More styling still required.
Commit https://github.com/develop-me/bagajob/pull/42/commits/ee491d805cecd146b292fd2ccf8327c06a1dfc17, https://github.com/develop-me/bagajob/pull/42/commits/e09682b977347eefbc961bd925a35025ee07e000
Action:
user_id
is now used correctly in the URLResult:
422 - Unprocessable Entity : API is no longer returning an authorisation error. Bearer token correctly used in header.
Closed in error.
Moved to separate issue for a later date post-MVP (Issue https://github.com/develop-me/bagajob/issues/55)
Now resolved Commit https://github.com/develop-me/bagajob/pull/42/commits/b68f7d7c0eec210c3aa2d5f9e91c14a6db8006e8
(Issue https://github.com/develop-me/bagajob/issues/46) Email, token and password now being correctly sent and backend returns 200 OK. Commit https://github.com/develop-me/bagajob/pull/42/commits/b68f7d7c0eec210c3aa2d5f9e91c14a6db8006e8
Now resolved Commit https://github.com/develop-me/bagajob/pull/42/commits/b68f7d7c0eec210c3aa2d5f9e91c14a6db8006e8
active
and stage
are not being sent in the POST requestNow resolved, active and stage are included in the POST request. Commit https://github.com/develop-me/bagajob/pull/42/commits/bc52e8dc009e03c547dc4596b15eba7a53c89212
NB - An issue still remains with this route that would require your attention: https://github.com/develop-me/bagajob-API/issues/23
When I register a new user, the POST route for registration works fine, however the Client then makes a GET request for UserID 5's jobs and bombs out... my guess is that state is not getting updated with the User sent back from the backend on successful registration. You might not be seeing it if you're staying in the same browser session and not fully clearing state before trying registration again.
Commit https://github.com/develop-me/bagajob/pull/42/commits/9cfcb733717c7c4645573477277570941f1d09b9
When a POST request is made to /register
, the bearer token is included in the header, results in status 200 OK when redirected to GET /user/:id/jobs
Bearer token now included in PATCH & DELETE requests to api/user/:id
Error message is displayed Request failed with status code 422
if a bad name or email is sent
Name and initials dynamically update on successful PATCH request
PATCH api/user/:id
- Returns 200 OK
DELETE api/user/:id
- Returns 204 No Content