import { Injectable } from '@angular/core' ; import { CardHistory } from '../../models/card-history' ; import { CollectionStorageService } from './collection-storage.service' ; @ Injectable ( ) export class CardHistoryStorageService { constructor ( private storage ) { } public async loadAll ( limit ) { return this . storage . getAllCardHistory ( limit ) ; } public async countHistory ( ) { return this . storage . countCardHistory ( ) ; } public async newHistory ( history ) { const result = await this . storage . saveCardHistory ( history ) ; } }