-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from vahidvdn/feature/support-useClass-and-useE…
…xisting Feature/support use class and use existing
- Loading branch information
Showing
8 changed files
with
139 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
RELEASE 1.0.0 | ||
## RELEASE 1.1.0 | ||
### Feature | ||
* Add full support for useClass and useExisting | ||
* Add more docs | ||
### Bug Fixes | ||
* Fix minor bugs | ||
|
||
## RELEASE 1.0.5 | ||
### Feature | ||
* Update package.json | ||
* Add more docs | ||
### Bug Fixes | ||
* Fix minor bugs | ||
|
||
## RELEASE 1.0.1 | ||
### Feature | ||
* Initial support for About currency conversion module for nestjs | ||
### Bug Fixes | ||
* Fix minor bugs |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Injectable } from "@nestjs/common"; | ||
import { ConfigService } from "@nestjs/config"; | ||
import { CashifyOptionsFactory } from 'nestjs-cashify'; | ||
|
||
@Injectable() | ||
export class CashifyConfigService implements CashifyOptionsFactory { | ||
constructor(private configService: ConfigService) {} | ||
|
||
createCashifyOptions() { | ||
const rates = { | ||
GBP: 0.92, | ||
EUR: 1.00, | ||
USD: 1.12 | ||
}; | ||
return { | ||
base: this.configService.get<string>('BASE'), | ||
rates | ||
}; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Interface describing a `CashifyOptionsFactory`. Providers supplying configuration | ||
* options for the Cashify module must implement this interface. | ||
* | ||
* @see [Async configuration](https://docs.nestjs.com/techniques/caching#async-configuration) | ||
* | ||
* @publicApi | ||
*/ | ||
export interface CashifyOptionsFactory { | ||
createCashifyOptions(); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './cashify-module.interface'; |