Browse Source

ensure type and description on a deviceRequest are defined

Mark deVilliers 2 years ago
parent
commit
3f93dea083
1 changed files with 2 additions and 2 deletions
  1. 2 2
      node/api/devices.go

+ 2 - 2
node/api/devices.go

@@ -32,8 +32,8 @@ func NewDeviceService(ctx context.Context, entitlementStore *EntitlementStore, m
32 32
 }
33 33
 
34 34
 type DeviceRequest struct {
35
-	Type        string `json:"type" description:"type of device"`
36
-	Description string `json:"description" description:"description of device"`
35
+	Type        string `json:"type" description:"type of device" validate:"nonzero"`
36
+	Description string `json:"description" description:"description of device" validate:"nonzero"`
37 37
 }
38 38
 
39 39
 type DeviceResponse struct {