administration create group
This commit is contained in:
parent
b54961b619
commit
d169566cd1
|
@ -160,22 +160,23 @@ func (h *ApplicationHandler) AdministrationCreateGroup(w http.ResponseWriter, r
|
||||||
Namespace: "parcoursmob_roles",
|
Namespace: "parcoursmob_roles",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
go func() {
|
||||||
_, err = h.services.GRPC.GroupsManagement.AddGroup(context.TODO(), request_organization)
|
_, err = h.services.GRPC.GroupsManagement.AddGroup(context.TODO(), request_organization)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}()
|
||||||
// Create the admin role for the organization
|
// Create the admin role for the organization
|
||||||
_, err = h.services.GRPC.GroupsManagement.AddGroup(context.TODO(), request_role)
|
go func() {
|
||||||
if err != nil {
|
_, err = h.services.GRPC.GroupsManagement.AddGroup(context.TODO(), request_role)
|
||||||
fmt.Println(err)
|
if err != nil {
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
fmt.Println(err)
|
||||||
return
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
}
|
return
|
||||||
|
}
|
||||||
|
}()
|
||||||
http.Redirect(w, r, fmt.Sprintf("/app/administration/groups/%s", groupid), http.StatusFound)
|
http.Redirect(w, r, fmt.Sprintf("/app/administration/groups/%s", groupid), http.StatusFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue