Dining Review API Portfolio Project
Welcome to the subcategory for the Dining Review API Portfolio Project. This portfolio project can be found in the following courses or paths:
How to Get Feedback on your Project
Congratulations on finishing your portfolio project! Now you’ll want to follow these steps to get feedback on it.
- Post a link to your GitHub repository
- Give us a few sentences about your experience. Was this fun? Difficult? How long did it take?
- Check back in—if someone has replied to your post, come see what they have to say.
How to Give Feedback on Another Learner’s Project
Reviewing someone else’s code isn’t just a nice thing to do; it’s also a great opportunity to sharpen your skills by viewing a different perspective.
- Refer to the article in your Career Path on How to Review Someone Else’s Code
- Click through topics in this subcategory to view other submissions of this project.
- Reply to a thread with feedback, encouragement, or letting them know if they did something in a way you hadn’t thought of before!
My attempt at the Dining Review API project
- Controllers, Entities and Repositories implemented (Restaurant, User and DiningReview)
- Basic Integration tests added (mvn verify to run)
Github repo - GitHub - brettjames250/dining-review
Struggling to implement the following requirements:
As part of the backend process that updates a restaurant’s set of scores, I want to fetch the set of all approved dining reviews belonging to this restaurant.
As an application experience, I want to fetch restaurants that match a given zip code and that also have at least one user-submitted score for a given allergy. I want to see them sorted in descending order.
Essentially I can’t work out how to store/update the restaurant entity when a new review is added?
Any help or feedback welcome
I’ve finished my Portfolio project. I’m still in the middle of the final task which is updating the scores of restaurants after the admin approves it. But anyway, it’s still decent in general.
Here is my Github link for the project: GitHub - Peonat2804/codecademy-dining at master
I would highly appreciate any feedback from you guys.
Have a good day.
Im just letting you know I have viewed your GitHub and it helped me with some things. I appreciate you putting it up!
Hi guys. I need a bit of help with one seemingly easy problem. I am having trouble using Lombok in my project.
The issue is that the necessary annotations provided by Lombok (
@Setter etc.) aren’t working for me. As a result, I can’t use my getter (or setter) methods in any of the services (example, the
registerUser() method in
UserService.java) despite using the appropriate Lombok annotations in the
User entity. Most, if not all solutions on the Internet suggest to reload the project, but it did not work for me (I am using VSCode as my IDE). You can check out my (unfinished) code in my repo for your convenience. Any kind of feedback/help is appreciated.
Also, thank you @brettjames2525 and @peonat for sharing your repos - they were really helpful in debugging some of the issues I was having.
Alright I know this is really stupid but I cannot seem to figure out how to get the IDE to recognize and run the Spring Initializr directory.
I have installed IntelliJ IDE and downloaded a JDK from the link provided here.
I have also generated a Spring directory according to the instructions–including dependencies: Spring Web, Spring Data JPA, H2 Database, and Lombok.
At this point it is not exactly clear to me how to connect the Spring directory to the IDE. I open the IDE, then what? I have tried: File>Open>Spring Directory. Is this correct? If so, what do I need to do next? I navigated to src>main>java>com>sample>sampleAPI and tried to run the sampleAPIapplication.java file, but to no avail.
What silly thing am I missing? Thanks.
Bit late for a reply but might help someone, I was struggling with this as well using the eclipse. Found out I had to download a lombok jar file from Download and add it to my project, that enabled me to get these annotations working correctly
Hi, do you have a walk through video we can refer to?
Greetings Codecademy family,
I completed the Dining Review API portfolio project which was fun to do. It took me weeks to complete as I was not coding regularly and I think it’s a great project to finish off the course.
Here’s a link to my project for anyone who would like to review it and give me feedback:
You could use a
findById repository method to get all the reviews for a particular restaurant and then use stream and filter got only those that have been approved into a List.
For this I had to annotate the repository method with @Query and within that annotation typed in the SQL query to accomplish the desired results.
One way to do this is to first add the new review, then calculate the averages for each (egg, peanut, dairy) and then update the restaurant’s scores.
(Talking through this just made me realise that I have to make a quick change to my code)
I would be grateful if someone can help me with part my CRUD functionality.
Project Link: GitHub - chininchu/Dining-Review-API
So it seems to me that I am able to do a @post request through my Dining User Controller. Although, there is some good news. I was able to make a query
Hibernate: select d1_0.id,d1_0.city,d1_0.display_name,d1_0.interested_in_dairy_allergies,d1_0.interested_in_egg_allergies,d1_0.interested_in_peanut_allergies,d1_0.state,d1_0.zipcode from dining_users d1_0 where d1_0.display_name=?
I am getting a 404 error. I have added the attachment. What do you think could bt the issue. I possibly have my doubts on the following:
- Maybe the application.properties is not set up correctly ?
- I maybe missing a particular annotation?
- I am using a mySQL database instead of a H2.
- I am not using any html pages (using thyme leaf) since the goal is just to get a JSON object in response.
- Here is the code snippet that I am using in my command line.
curl -X POST “http://localhost:8080/api/users/create”
-H “Content-Type: application/json”
“city”: “New York”,
I am a fairly new developer. Please bear with me