zohaibk22 / Hitch

0 stars 1 forks source link

Api rendering issues #11

Closed zohaibk22 closed 4 years ago

zohaibk22 commented 4 years ago

PROJECT ISSUE TICKET

Unexpected Behavior

When attempting to pull or create objects from our API, we are unable to do so using Localhost. We have a feeling the root of the issue may be with our ApiConfig file but we are unsure

Expected Behavior

When attempting to pull data from our Api to our edit user-info page or our display user-info page, we expect our respective form fields to populate with the data from our API. However, that is where the main roadblock is. We have been able to populate the form fields with data, but in an unconventional method. Also, we are having trouble creating objects from the our create-user page as well. The form is functional. However, we are unable to actually transfer the data from the input fields into our MongoDB database

Reproduce the Error

Describe the steps we can take to reproduce the error, i.e.:

1. Clone this repo.
2. Run `npm start`.
3. this is our edit user page: http://localhost:3001/profile/5f157e470d420300174e8ca4
4. this is our create-user page: http://localhost:3001/create/profile
5. this is our edit-user page: http://localhost:3001/profile/update/5f157e470d420300174e8ca4

Documentation

In the state our code is currently in, we are not receiving any error messages. However, when utilizing the conventional react architecture, we were receiving 404 errors on the front end when attempting to pull data from our MongoDB server running locally on our machine

Attempted Resolution

1. https://stackoverflow.com/questions/51794553/how-do-i-create-configuration-for-axios-for-default-request-headers-in-every-htt 
2. https://blog.bitsrc.io/build-a-login-auth-app-with-mern-stack-part-1-c405048e3669
zohaibk22 commented 4 years ago

Issue resolved