DataMascara / cisc3140-su19-project

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

Where is the member count coming from on the Trending sidebar #87

Closed chalshaff12 closed 5 years ago

chalshaff12 commented 5 years ago

On the Trending ports sidebar, where is the member count of each Port coming from?

Right now it seems to be displaying member counts for all users where it should only be displaying counts for active users. I may need to update a view in the database so I'm wondering where that number is being pulled from.

mary060196 commented 5 years ago

@chalshaff12 , you are right: based on the Back End team's implementation, it probably counts the total number of active users, but to be sure we need to ask them. I assign @derickfan and @Maker-Mark , who can answer this question.

derickfan commented 5 years ago

Screen Shot 2019-08-18 at 10 10 03 PM We're calling the all_subscriptions_by function for each of the ports and then using the len() function to get the size of the list which is the number of users subscribed to it

Screen Shot 2019-08-18 at 10 13 06 PM

chalshaff12 commented 5 years ago

I changed the database view to give the subscriptions only for active users, but the page still displays the old numbers. Any idea where it's going wrong?

derickfan commented 5 years ago

If you're logged in you're gonna need to relog to refresh the session so the trending ports will be updated

chalshaff12 commented 5 years ago

Ah ok, looks good. Thank you!