fixing typo
This commit is contained in:
parent
b8001262dc
commit
d8e51e2ff4
|
|
@ -56,7 +56,7 @@ func NewDeviceDetailsUseCase(deviceDetailsRepo repository.DeviceDetailsRepo, geo
|
||||||
|
|
||||||
func (u *deviceDetailsUseCase) GetDevicesWithoutConnections(deviceTypes []string) ([]res.DeviceDetailsResponse, error) {
|
func (u *deviceDetailsUseCase) GetDevicesWithoutConnections(deviceTypes []string) ([]res.DeviceDetailsResponse, error) {
|
||||||
// Validate device types
|
// Validate device types
|
||||||
validTypes := map[string]bool{"closure": true, "OTB": true}
|
validTypes := map[string]bool{"CLOSURE": true, "OTB": true}
|
||||||
for _, deviceType := range deviceTypes {
|
for _, deviceType := range deviceTypes {
|
||||||
if !validTypes[deviceType] {
|
if !validTypes[deviceType] {
|
||||||
return nil, fmt.Errorf("invalid device type: %s. Only closure and OTB are allowed", deviceType)
|
return nil, fmt.Errorf("invalid device type: %s. Only closure and OTB are allowed", deviceType)
|
||||||
|
|
@ -65,7 +65,7 @@ func (u *deviceDetailsUseCase) GetDevicesWithoutConnections(deviceTypes []string
|
||||||
|
|
||||||
// If no device types provided, default to closure and OTB
|
// If no device types provided, default to closure and OTB
|
||||||
if len(deviceTypes) == 0 {
|
if len(deviceTypes) == 0 {
|
||||||
deviceTypes = []string{"closure", "OTB"}
|
deviceTypes = []string{"CLOSURE", "OTB"}
|
||||||
}
|
}
|
||||||
|
|
||||||
devices, err := u.deviceDetailsRepo.GetDevicesWithoutConnections(deviceTypes)
|
devices, err := u.deviceDetailsRepo.GetDevicesWithoutConnections(deviceTypes)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue