Resolve "User Rating System"
Merge request reports
Activity
added 8 commits
-
7b34c155...1620dce4 - 7 commits from branch
master
- d42409fd - Merge branch 'master' into 48-user-rating-system
-
7b34c155...1620dce4 - 7 commits from branch
@snjazim Let me know when you get a chance to look at this issue and are able to provide comments
mentioned in merge request !23 (merged)
@jmshahen, I can't load Book details page.
@snjazim I will need a lot more information on the error you are encountering
@jmshahen, clicking any book title does not load the detail page. It shows the following
This page isn’t working 127.0.0.1 didn’t send any data. ERR_EMPTY_RESPONSE
@snjazim Can you show me an picture of the error shown in the browser and the error shown in vs code's debugging window
- Edited by Syeda Noor Jaha Azim
CREATE TABLE "public"."Reviews" ( "user_id" INT NOT NULL, "book_id" INT NOT NULL, "date_created" TIMESTAMP NOT NULL DEFAULT NOW(), "rating" INT NOT NULL, "review" TEXT NULL, PRIMARY KEY ("user_id", "book_id"), CONSTRAINT "book_id_fk" FOREIGN KEY ("book_id") REFERENCES "public"."Books" ("book_id") ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT "user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."Users" ("user_id") ON DELETE NO ACTION ON UPDATE NO ACTION);
@jmshahen, INSERT queries of Review table in !23 (merged) has review_id column. If we change the Review table structure all the insert queries will have to be changed there.
Yes, but it is an easy fix:
Change this:
INSERT INTO public."Reviews" (review_id, user_id, book_id, rating, review) VALUES (3197, 2505, 899, 4, 'nice smooth transition reading');
to this:
INSERT INTO public."Reviews" (user_id, book_id, rating, review) VALUES (2505, 899, 4, 'nice smooth transition reading');
@jmshahen, changed the Review table but it shows the same error when loading the book details page.
@snjazim you are going to need to show me more details if I am to even attempt to help debug this
@jmshahen, Book details page is working fine now.
@jmshahen, wouldn't we allow the user to submit more than one comment on a book?
@snjazim These aren't comments, they are reviews. You can only have 1 review of a book per user. In future changes we can program in the ability to change a review.
@snjazim Is this able to be merged now?
@jmshahen, yes its good to be merged.
mentioned in commit 3bef0175