Merge branch 'max_dev' of Software_Engineering_I/greenvironment-frontend into master

master
Max_ES 5 years ago committed by Gitea
commit 0152b82b8f

@ -34,7 +34,7 @@ export class FeedComponent implements OnInit {
this.data.currentUserInfo.subscribe(user => { this.data.currentUserInfo.subscribe(user => {
this.user = user; this.user = user;
this.loggedIn = user.loggedIn; this.loggedIn = user.loggedIn;
if(this.loggedIn){ if (this.loggedIn) {
this.userId = user.userID; this.userId = user.userID;
this.feedService.getAllPostsRawByUserId(this.userId).subscribe(response => { this.feedService.getAllPostsRawByUserId(this.userId).subscribe(response => {
this.feedNew = this.feedService.renderAllPosts(response.json()); this.feedNew = this.feedService.renderAllPosts(response.json());
@ -49,7 +49,7 @@ export class FeedComponent implements OnInit {
this.feedMostLiked = this.feedNew; this.feedMostLiked = this.feedNew;
console.log(this.feedNew); console.log(this.feedNew);
}); });
} }
}); });

@ -53,7 +53,7 @@ export class LoginService {
public buildJson(login: Login): any { public buildJson(login: Login): any {
const body = { const body = {
query: `mutation($email: String, $pwHash: String) { query: `mutation($email: String!, $pwHash: String!) {
login(email: $email, passwordHash: $pwHash) { login(email: $email, passwordHash: $pwHash) {
id, id,
name, name,

Loading…
Cancel
Save