@dhedge/backend-flatcoin-core 0.2.13 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,8 @@ export declare class FlatcoinPnlRepository {
6
6
  private readonly logger;
7
7
  constructor(repository: Repository<FlatcoinPnl>, logger: Logger);
8
8
  getAll(): Promise<FlatcoinPnl[]>;
9
- save(flatcoinPnls: FlatcoinPnl[]): void;
9
+ save(flatcoinPnl: FlatcoinPnl): void;
10
+ saveAll(flatcoinPnls: FlatcoinPnl[]): void;
10
11
  getLastUpdatedAt(): Promise<FlatcoinPnl | null>;
11
12
  findByAccount(account: string): Promise<FlatcoinPnl | null>;
12
13
  }
@@ -25,7 +25,10 @@ let FlatcoinPnlRepository = class FlatcoinPnlRepository {
25
25
  async getAll() {
26
26
  return this.repository.createQueryBuilder().getMany();
27
27
  }
28
- save(flatcoinPnls) {
28
+ save(flatcoinPnl) {
29
+ this.repository.save(flatcoinPnl).catch((error) => this.logger.error('Error while saving flatcoin pnl', error));
30
+ }
31
+ saveAll(flatcoinPnls) {
29
32
  this.repository.save(flatcoinPnls).catch((error) => this.logger.error('Error while saving flatcoin pnl', error));
30
33
  }
31
34
  async getLastUpdatedAt() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhedge/backend-flatcoin-core",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "Backend Flatcoin Core",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",