Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering update #8

Merged
merged 8 commits into from May 9, 2022
Merged

Rendering update #8

merged 8 commits into from May 9, 2022

Conversation

JeanCGedeon
Copy link
Collaborator

fix fetch request on the front-end
add userId into state on the front-end
edit the top bar
add attractionReviewsRouter(also update userId in the post request)

Alex Cameron and others added 7 commits May 6, 2022 10:55
Co-authored-by: JeanCGedeon <JeanCGedeon@users.noreply.github.com>
Co-authored-by: Tyler <br.ndt.tyler@gmail.com>
Co-authored-by: camziny <camziny@users.noreply.github.com>
fix front-end post request for reviews (added userId in state)
merge attractionReviewsRouter
merge from
4232cef

Co-authored-by: Tyler <br.ndt.tyler@gmail.com>
Co-authored-by: camziny <camziny@users.noreply.github.com>
client/src/components/App.js Outdated Show resolved Hide resolved
client/src/components/AttractionShowPage.js Outdated Show resolved Hide resolved
client/src/components/AttractionShowPage.js Outdated Show resolved Hide resolved
client/src/components/AttractionShowPage.js Outdated Show resolved Hide resolved
client/src/components/AttractionsList.js Outdated Show resolved Hide resolved
} catch (error) {
return res.status(500).json({ errors: error });
}
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user id should come from your passport session, via req.user, not from the frontend.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is also no ValidationError handling here. You are handling for these types of errors on the frontend, but in this implementation those errors would never be used

client/src/components/NewReviewForm.js Show resolved Hide resolved
client/src/components/NewAttractionForm.js Show resolved Hide resolved
server/src/routes/api/v1/attractionsRouter.js Outdated Show resolved Hide resolved
server/src/routes/api/v1/attractionsRouter.js Outdated Show resolved Hide resolved
client/src/components/AttractionShowPage.js Outdated Show resolved Hide resolved
client/src/components/AttractionsList.js Show resolved Hide resolved
client/src/components/NewAttractionForm.js Show resolved Hide resolved
client/src/components/NewAttractionForm.js Show resolved Hide resolved
client/src/components/NewAttractionForm.js Outdated Show resolved Hide resolved
add locationAttractionsRouter
remove placeholders from forms
incorporate user session data
add authenticated routes for forms
add Location dropdown to NewAttractionForm

Co-authored-by: JeanCGedeon <JeanCGedeon@users.noreply.github.com>
@nwalberts nwalberts merged commit c07ee49 into main May 9, 2022
@br-ndt br-ndt deleted the rendering-update branch May 10, 2022 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants