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

master
Max_ES 5 years ago committed by Gitea
commit b3d6074042

@ -7,7 +7,10 @@ import {DatasharingService} from 'src/app/services/datasharing.service';
const graphqlCreateGroupQuery = `mutation($name: String!) {
createGroup(name: $name) {
id
id,
name,
picture,
deletable
}
}`;
@ -39,7 +42,10 @@ export class SocialService extends BaseService {
*/
createGroup(name: string) {
const body = SocialService.buildGroupCreateBody(name);
return this.postGraphql(body, null, 0);
return this.postGraphql(body, null, 0)
.pipe(tap(response => {
this.data.addGroupToUser(response.data.createGroup);
}));
}
public removeFriend(id: number) {

Loading…
Cancel
Save