Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>
// Override normal API endpoint (for testing)
svc.BasePath = p
}
- person, err := people.NewPeopleService(svc).Get("people/me").Fields("emailAddresses,names").Do()
+ person, err := people.NewPeopleService(svc).Get("people/me").PersonFields("emailAddresses,names").Do()
if err != nil {
if strings.Contains(err.Error(), "Error 403") && strings.Contains(err.Error(), "accessNotConfigured") {
// Log the original API error, but display
w.Header().Set("Content-Type", "application/json")
switch req.URL.Path {
case "/v1/people/me":
- if f := req.Form.Get("fields"); f != "emailAddresses,names" {
+ if f := req.Form.Get("personFields"); f != "emailAddresses,names" {
w.WriteHeader(http.StatusBadRequest)
break
}