From 3f2cc19c45b4fd881c75ed24d8668bc640e7d25b Mon Sep 17 00:00:00 2001 From: Josh Freda Date: Fri, 19 Jan 2024 11:15:00 -0600 Subject: [PATCH] Return names with people API response --- internal/api/people.go | 4 ++-- internal/api/v2/people.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/api/people.go b/internal/api/people.go index b0c966957..9957507e6 100644 --- a/internal/api/people.go +++ b/internal/api/people.go @@ -43,7 +43,7 @@ func PeopleDataHandler( // Only query for photos and email addresses // This may be expanded based on use case // in the future - ReadMask("photos,emailAddresses"). + ReadMask("emailAddresses,names,photos"). Sources("DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE"). Do() if err != nil { @@ -77,7 +77,7 @@ func PeopleDataHandler( for _, email := range emails { result, err := s.People.SearchDirectoryPeople(). Query(email). - ReadMask("photos,emailAddresses"). + ReadMask("emailAddresses,names,photos"). Sources("DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE"). Do() diff --git a/internal/api/v2/people.go b/internal/api/v2/people.go index c62cc6df1..fac1f778d 100644 --- a/internal/api/v2/people.go +++ b/internal/api/v2/people.go @@ -37,7 +37,7 @@ func PeopleDataHandler(srv server.Server) http.Handler { // Only query for photos and email addresses // This may be expanded based on use case // in the future - ReadMask("photos,emailAddresses"). + ReadMask("emailAddresses,names,photos"). Sources("DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE"). Do() if err != nil { @@ -74,7 +74,7 @@ func PeopleDataHandler(srv server.Server) http.Handler { for _, email := range emails { result, err := srv.GWService.People.SearchDirectoryPeople(). Query(email). - ReadMask("photos,emailAddresses"). + ReadMask("emailAddresses,names,photos"). Sources("DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE"). Do()