-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NOISSUE - Fix ViewGroup and UpdateGroup #1269
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,7 +129,9 @@ func (req createGroupReq) validate() error { | |
|
||
type updateGroupReq struct { | ||
token string | ||
id string | ||
Name string `json:"name,omitempty"` | ||
ParentID string `json:"parent_id,omitempty"` | ||
Description string `json:"description,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need parent id here also |
||
Metadata map[string]interface{} `json:"metadata,omitempty"` | ||
} | ||
|
@@ -138,12 +140,16 @@ func (req updateGroupReq) validate() error { | |
if req.token == "" { | ||
return users.ErrUnauthorizedAccess | ||
} | ||
if req.id == "" { | ||
return users.ErrMalformedEntity | ||
} | ||
if req.Name == "" { | ||
return users.ErrMalformedEntity | ||
} | ||
if len(req.Name) > maxNameSize { | ||
return users.ErrMalformedEntity | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant that you can There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agreed to group this checks by type but for consistency with other services and readability I would keep it like that. |
||
|
||
return nil | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mising ID