mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-10 18:21:34 +03:00
groups: move adding owner to backend
This commit is contained in:
parent
e1c745fdb9
commit
28c35d8715
@ -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])
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user