Skip to content

Commit

Permalink
Client model for client injected apis
Browse files Browse the repository at this point in the history
  • Loading branch information
juanhapes committed Jul 25, 2019
1 parent 9976cf8 commit 0ce6601
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Expand Up @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [1.1.0] - 2019-07-25
### Added
- Client model for client injected apis

## [1.0.1] - 2019-07-23
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion lib/api-get.js
Expand Up @@ -62,7 +62,7 @@ class ApiGet extends API {
_getModelInstance(modelPath) {
// eslint-disable-next-line global-require, import/no-dynamic-require
const Model = require(modelPath);
return new Model();
return this.client ? this.client.getInstance(Model) : new Model();
}

}
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@janiscommerce/api-get",
"version": "1.0.1",
"version": "1.1.0",
"description": "A package to handle JANIS Get APIs",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 0ce6601

Please sign in to comment.