Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ doc/framework
dead_links.json

# Cypress debug
doc/6/getting-started/.react/cypress/screenshots
doc/6/getting-started/.react/cypress/videos
doc/6/getting-started/.vuejs/cypress/screenshots
doc/6/getting-started/.vuejs/cypress/videos
doc/7/getting-started/.react/cypress/screenshots
doc/7/getting-started/.react/cypress/videos
doc/7/getting-started/.vuejs/cypress/screenshots
doc/7/getting-started/.vuejs/cypress/videos
Comment on lines +21 to +24
Copy link
Contributor

Choose a reason for hiding this comment

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

So this .gitignore has to be updated every time a new version comes out?

Suggested change
doc/7/getting-started/.react/cypress/screenshots
doc/7/getting-started/.react/cypress/videos
doc/7/getting-started/.vuejs/cypress/screenshots
doc/7/getting-started/.vuejs/cypress/videos
doc/*/getting-started/.react/cypress/screenshots
doc/*/getting-started/.react/cypress/videos
doc/*/getting-started/.vuejs/cypress/screenshots
doc/*/getting-started/.vuejs/cypress/videos


# Debug snippets
test-*.js
2 changes: 1 addition & 1 deletion doc/7/getting-started/react-native/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This section deals with **Kuzzle V2** (+ **Javascript SDK 7**) and **React Nativ

- **Node.js** >= 12.0.0 ([install here](https://nodejs.org/en/download/))
- **Running Kuzzle V2 Stack** ([instructions here](/core/2/guides/getting-started/running-kuzzle))
- **Expo CLI** ([install here](https://docs.expo.io/versions/v36.0.0/get-started/installation/))
- **Expo CLI** ([install here](https://docs.expo.io/get-started/installation))

"[Expo](https://docs.expo.io/versions/latest/) is a framework and a platform for universal React applications. It is a set of tools and services built around React Native and native platforms that help you develop, build, deploy, and quickly iterate on iOS, Android, and web apps from the same JavaScript/TypeScript codebase."

Expand Down
9 changes: 6 additions & 3 deletions src/controllers/Collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,14 @@ class CollectionController extends BaseController {
}

getMapping (index, collection, options = {}) {
return this.query({
const request = {
index,
collection,
action: 'getMapping'
}, options)
action: 'getMapping',
includeKuzzleMeta: options.includeKuzzleMeta || false
};

return this.query(request, options)
.then(response => response.result);
}

Expand Down
38 changes: 0 additions & 38 deletions test-js.js

This file was deleted.

25 changes: 0 additions & 25 deletions test-sdk.js

This file was deleted.

5 changes: 4 additions & 1 deletion test/controllers/collection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ describe('Collection Controller', () => {
}
}
});
options.includeKuzzleMeta = true;


return kuzzle.collection.getMapping('index', 'collection', options)
.then(res => {
Expand All @@ -140,7 +142,8 @@ describe('Collection Controller', () => {
controller: 'collection',
action: 'getMapping',
index: 'index',
collection: 'collection'
collection: 'collection',
includeKuzzleMeta: true
}, options);

should(res).match({
Expand Down