Add DEPProfileStatus to API response (#617)

Exposes the dep_profile_status field in the devices response.
This commit is contained in:
Graham Gilbert
2019-10-02 17:04:32 +02:00
committed by Victor Vrantchan
parent ed073964ae
commit 310fd1ee75

View File

@@ -19,10 +19,11 @@ type ListDevicesOption struct {
}
type DeviceDTO struct {
SerialNumber string `json:"serial_number"`
UDID string `json:"udid"`
EnrollmentStatus bool `json:"enrollment_status"`
LastSeen time.Time `json:"last_seen"`
SerialNumber string `json:"serial_number"`
UDID string `json:"udid"`
EnrollmentStatus bool `json:"enrollment_status"`
LastSeen time.Time `json:"last_seen"`
DEPProfileStatus DEPProfileStatus `json:"dep_profile_status"`
}
func (svc *DeviceService) ListDevices(ctx context.Context, opt ListDevicesOption) ([]DeviceDTO, error) {
@@ -34,6 +35,7 @@ func (svc *DeviceService) ListDevices(ctx context.Context, opt ListDevicesOption
UDID: d.UDID,
EnrollmentStatus: d.Enrolled,
LastSeen: d.LastSeen,
DEPProfileStatus: d.DEPProfileStatus,
})
}
return dto, err