DataMascara / cisc3140-su19-project

https://bc-app-class.herokuapp.com/login/
2 stars 5 forks source link

postDetails page is doing everything twice #60

Closed derickfan closed 5 years ago

derickfan commented 5 years ago

Screen Shot 2019-08-14 at 1 34 35 PM

Every time we load the page it will run it twice. So if we commented on a post it would post two comments. What is this script for? Screen Shot 2019-08-14 at 1 35 56 PM

mary060196 commented 5 years ago

Hey, @derickfan and @Maker-Mark ! This code has been added so that users do not have to refresh a page twice. The question is, why is the comment submitted twice? If I remove this JS code, will the users need to refresh the page manually to see the comment they wrote? Thanks for the reply!

Maker-Mark commented 5 years ago

Hey, @derickfan and @Maker-Mark ! This code has been added so that users do not have to refresh a page twice. The question is, why is the comment submitted twice? If I remove this JS code, will the users need to refresh the page manually to see the comment they wrote? Thanks for the reply!

We fixed the duplicate posting and added a refresh on commenting. All should be good. Closing this for now