Quaffel / get-me-drunk-efficiently

Webservice providing cocktail recommendations based on how drunk you want to be
4 stars 0 forks source link

Clean up Data Module #39

Closed Jonasdoubleyou closed 2 years ago

Jonasdoubleyou commented 3 years ago

Maybe we are able to generalize:

interface DataSource {
  getDrinks(): Promise<IDrink[]>;
  getIngredient(id: string): IIngredient;
  getAlcoholOf(id: string): number;
}

Then we could move the caching logic on top of that.