Skip to content

Conversation

@pzduniak
Copy link

No description provided.

session := c.Env["token"].(*models.Token)

// Ensure that the input data isn't empty
if input.Data != "" || input.Name != "" || input.Encoding != "" || input.VersionMajor != nil || input.VersionMinor != nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some utility to check this would be nice like checkEmpty or anyEmpty.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we really want, we could use a validation library and move the validation to the request struct.

pzduniak added a commit that referenced this pull request Nov 17, 2014
@pzduniak pzduniak merged commit 21ce1e3 into develop Nov 17, 2014
@pzduniak pzduniak deleted the feature/contacts branch November 30, 2014 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants