From c67099df0390f862f91ed7664834ac12ce585e5a Mon Sep 17 00:00:00 2001 From: Hoang Date: Fri, 10 Dec 2021 14:58:55 +0700 Subject: [PATCH] not require UserAgent --- validate.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/validate.go b/validate.go index 5673812..d58566e 100644 --- a/validate.go +++ b/validate.go @@ -16,14 +16,6 @@ func (co CreateOptions) validate() error { return errors.New("no deviceID data") } - // UserAgent - if co.UserAgent == "" { - logger.Error("devicemngmt - Create: no userAgent data", logger.LogData{ - "payload": co, - }) - return errors.New("no userAgent data") - } - // IP if co.IP == "" { logger.Error("devicemngmt - Create: no ip data", logger.LogData{ @@ -66,14 +58,6 @@ func (uo UpdateOptions) validate() error { return errors.New("invalid userID data") } - // UserAgent - if uo.UserAgent == "" { - logger.Error("devicemngmt - Update: no userAgent data", logger.LogData{ - "payload": uo, - }) - return errors.New("no userAgent data") - } - // IP if uo.IP == "" { logger.Error("devicemngmt - Update: no ip data", logger.LogData{