Skip to content

Conversation

@deankarn
Copy link

@deankarn deankarn commented Feb 8, 2017

What Changed?

  • It used to be that the Group function handled 3 different scenarios:
  1. .Group("/users") - group with existing middleware
  2. .Group("/users", nil) - group but retain no middleware
  3. .Group("/users", MoreMiddleware) - group, retain existing and add MoreMiddleware

This was confusing and even I was always referring to the function to remember what it all did so here is how it works now.

  1. .Group("/users") - group with existing middleware
  2. .GroupWithNone("/users") - group but retain no middleware.
  3. .GroupWithMore("/users", MoreMiddleware) - group, retain existing and add MoreMiddleware

joeybloggs added 2 commits February 3, 2017 11:41
Removed Group and replaced with: GroupWithExisting, GroupWithNone and GroupWithMore.
Group handled all three in one, but was confusing and was constantly refering back to the source
to remember how it worked; now it is clear.
- GroupWithExisting wa too long for a default behaviour function.
- Updated README version as this is a breaking change.
@deankarn deankarn self-assigned this Feb 8, 2017
@deankarn deankarn merged commit 5489e33 into master Feb 8, 2017
@deankarn deankarn deleted the group-logic-update branch February 13, 2017 00:34
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.

2 participants