-
Type: Task
-
Resolution: Won't Do
-
Priority: Minor - P4
-
Affects Version/s: None
-
None
-
5
Currently, index fetching is done in mongodb-index-model. We want to consolidate all data requests in data-service, and reducing the *-models to simply be data containers, without any dependency on mongodb.
This ticket represents the task of moving the fetching code to data-service, and populating the index-model there.
It is orthogonal to, and does not include the refactoring work of "de-ampersanding" the index model (COMPASS-356). Data-service would then depend on index-model, pass the raw server response to the model and return a collection of indexes to the caller of getIndexes().
Tasks:
- move the functionality of fetch.js to data-service
- populate the index model (as is, with ampersand) with the data returned from the server
- move fetch.test.js to data-service
- keep index.test.js in index-model
- completely remove dependency on mongodb from index-model