groups: move adding owner to backend

This commit is contained in:
Liam Fitzgerald 2020-07-08 11:17:24 +10:00
parent e1c745fdb9
commit 28c35d8715
2 changed files with 1 additions and 2 deletions

View File

@ -148,6 +148,7 @@
(en-path:resource rid)
;: weld
:~ (group-poke [%add-group rid policy.act %.n])
(group-poke [%add-members rid (sy our.bol ~)])
(group-push-poke %add rid)
(contact-poke [%create path])
(contact-hook-poke [%add-owned path])

View File

@ -102,7 +102,6 @@ export class NewScreen extends Component<NewScreenProps, NewScreenState> {
};
const { groupName } = this.state;
const resource: Resource = { ship: `~${window.ship}`, name: groupName };
this.setState(
{
invites: { ships: [], groups: [] },
@ -111,7 +110,6 @@ export class NewScreen extends Component<NewScreenProps, NewScreenState> {
() => {
props.api.contacts
.create(groupName, policy, this.state.title, this.state.description)
.then(() => props.api.groups.add(resource, [`~${window.ship}`]))
.then(() => {
this.setState({ awaiting: false });
props.history.push(