diff --git a/lib/src/entity_builder.dart b/lib/src/entity_builder.dart index f6431eb..275adb5 100644 --- a/lib/src/entity_builder.dart +++ b/lib/src/entity_builder.dart @@ -24,8 +24,7 @@ class EntityBuilder { createdAt: DateTime.parse(json['created_at']), isAdmin: json['is_admin'], ); - api.userCache.cache(user); - return user; + return api.userCache.cache(user); } Currency buildCurrency(Map json) { @@ -38,7 +37,6 @@ class EntityBuilder { decimalPlaces: json['decimal_places'], user: json['user'], ); - api.currencyCache.cache(currency); - return currency; + return api.currencyCache.cache(currency); } }