getEndPoints() compatibility for strong-remoting - #241
Merged
Conversation
bajtos
suggested changes
Sep 23, 2016
bajtos
left a comment
Member
There was a problem hiding this comment.
The approach looks reasonable to me. Can we rename getEndpoints to something more descriptive, e.g. getPropertyOfFirstEndpoint?
Contributor
Author
|
@bajtos PTAL |
bajtos
approved these changes
Oct 4, 2016
bajtos
left a comment
Member
There was a problem hiding this comment.
Two minor comments to consider, no further review is necessary.
| // this method is added to support both flavors of the getEndPoints method | ||
| // in strong-remoting 2.x methods `getHttpMethod()` and `getFullPath()` were used | ||
| // in strong-remoting 3.x we have deprecated those methods in favor of getEndPoints() | ||
| function getEndPointsBackwardsCompatility(remoteObj, item) { |
Member
There was a problem hiding this comment.
Can we rename this function too please?
| return remoteObj.getHttpMethod(); | ||
| } else if (item == 'fullPath') { | ||
| return remoteObj.getFullPath(); | ||
| } |
Member
There was a problem hiding this comment.
What if item is neither verb nor fullPath? Should we throw an error instead of returning undefined?
davidcheung
force-pushed
the
getendpoints-compatibility
branch
from
October 4, 2016 18:28
27fc1f8 to
27c3953
Compare
in strong-remoting 2.x methods `getHttpMethod()` and `getFullPath()` were used in strong-remoting 3.x we have deprecated those methods in favor of getEndPoints() this patch is so users using newer SDK can still choose to use old strong-remoting the change was introduced in /pull/229
davidcheung
force-pushed
the
getendpoints-compatibility
branch
from
October 4, 2016 18:30
27c3953 to
3d2d783
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes /issues/236
in strong-remoting 2.x methods
getHttpMethod()andgetFullPath()were usedin strong-remoting 3.x we have deprecated those methods in favor of getEndPoints()
this patch is so users using newer SDK can still choose to use old strong-remoting
the change was introduced in /pull/229