Skip to content

Commit ee65532

Browse files
author
Kumar, Sourav
committed
Bugfix/Fix wrong unauthorized access to home page
1 parent 10bb56a commit ee65532

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

public/js/config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var configTestEnv = {
2-
"authServiceHost" : "https://auth-service-prd.herokuapp.com",
3-
"userServiceHost" : "https://user-service-prd01.herokuapp.com",
4-
"productServiceHost": "https://product-service-prd.herokuapp.com",
5-
"notificationServiceHost": "https://notification-service-prd.herokuapp.com"
2+
"authServiceHost" : "http://localhost:8081",
3+
"userServiceHost" : "http://localhost:8082",
4+
"productServiceHost": "http://localhost:8083",
5+
"notificationServiceHost": "http://localhost:8084"
66
}

public/js/home.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ class HomeController extends BaseController {
3131
.then(data => {
3232
if(data["status"] == "success") {
3333
this.setAuthTokenInContext(data["token"])
34+
this.fetchUserData();
35+
this.fetchUnreadCountForNotifications("Opioner | Home");
36+
this.loadAllPublicFeeds();
3437
}
3538
else {
3639
window.location.href = "index.html"
@@ -866,10 +869,6 @@ var homeController = new HomeController();
866869

867870
function initialLoadForFeedPage() {
868871

869-
homeController.fetchUserData();
870-
homeController.fetchUnreadCountForNotifications("Opioner | Home");
871-
homeController.loadAllPublicFeeds()
872-
873872
// infinite scrolling loading 10 items at a time, each time user reaches the end of page
874873
window.addEventListener('scroll', () => {
875874

0 commit comments

Comments
 (0)