Skip to content

Commit a870bb1

Browse files
authored
Merge pull request yury-dymov#7 from lvauvillier/links-filterendpoint-false
Sore links on metaObject when filterEndpoint is set to false
2 parents 0b03ce4 + 24daee9 commit a870bb1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/normalize.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ function extractMetaData(json, endpoint, { camelizeKeys, filterEndpoint }) {
120120
metaObject.data = meta;
121121

122122
if (json.links) {
123+
metaObject.links = json.links;
123124
ret.meta[doFilterEndpoint(endpoint)].links = json.links;
124125
}
125126

test/normalize.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,10 @@ describe('meta', () => {
347347
}
348348
}
349349
}],
350+
links: {
351+
next: "http://example.com/api/v1/posts/friends_feed/superyuri?page[cursor]=5037",
352+
first: "http://api.postie.loc/v1/posts/friends_feed/superyuri?page[cursor]=0"
353+
},
350354
},
351355
links: {
352356
next: "http://example.com/api/v1/posts/friends_feed/superyuri?page[cursor]=5037",

0 commit comments

Comments
 (0)