add request to personal information
This commit is contained in:
@@ -52,17 +52,17 @@ func CreatePerson(person model.PersonalInformationCreate, header http.Header) (*
|
||||
}
|
||||
|
||||
func GetPersons(ids []uuid.UUID, header http.Header) (map[uuid.UUID]model.PersonalInformation, error) {
|
||||
type BatchBody struct {
|
||||
ids []uuid.UUID
|
||||
}
|
||||
|
||||
var persons []model.PersonalInformation
|
||||
personsMap := make(map[uuid.UUID]model.PersonalInformation)
|
||||
|
||||
jsonIds, err := json.Marshal(&BatchBody{
|
||||
ids: ids,
|
||||
jsonIds, err := json.Marshal(&map[string][]uuid.UUID{
|
||||
"ids": ids,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
data, err, req := api.PostRequest(
|
||||
config.Env.MSHosts.PersonsHost+"/persons/batch/",
|
||||
jsonIds,
|
||||
|
||||
Reference in New Issue
Block a user