NewSpring / Rock-Plugins

NewSpring plugins for Rock RMS
http://www.rockrms.com/
3 stars 5 forks source link

Add an api endpoint to create a person with a campus id #203

Closed ghost closed 8 years ago

ghost commented 9 years ago

This cannot be done with the core rock api method where the third parameter is the campusId: https://github.com/NewSpring/Rock/blob/develop/Rock.Rest/Controllers/PeopleController.Partial.cs#L191

dcs619 commented 8 years ago

@benwiley Does a person's family group not get created in the core API? If so does it just ignore the Campus?

ghost commented 8 years ago

The campus is set to null. So it is possible to use that method, wait for everything (group, group member) to sync to Apollos, then update the group. It's just much simpler to do it this way on the Apollos side. Another approach could be to do a core pull-request that allows the original API method to accept a campusId. Instead of a person model, the parameter would have to be a PersonWithCampus that inherits Person.

dcs619 commented 8 years ago

@benwiley That seems like a bug for anyone else using multi-site... I'd post your findings as a new issue and see what they say.

What would your ideal api method look like?

ghost commented 8 years ago

My ideal api method would be the approach described above: "allows the original API method to accept a campusId. Instead of a person model, the parameter would have to be a PersonWithCampus that inherits Person."

ghost commented 8 years ago

https://github.com/SparkDevNetwork/Rock/issues/1257