feat: refactor API paths for authentication, inventory, and recipes; add contract tests for repositories
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:go_router/go_router.dart';
|
||||
|
||||
import '../../../core/api/api_error_mapper.dart';
|
||||
import '../../../core/api/api_exception.dart';
|
||||
import '../../../core/api/api_paths.dart';
|
||||
import '../../../core/api/api_providers.dart';
|
||||
import '../../../core/forms/form_options.dart';
|
||||
import '../../../core/ui/async_state_views.dart';
|
||||
@@ -109,7 +110,7 @@ class _RecipeEditScreenState extends ConsumerState<RecipeEditScreen> {
|
||||
try {
|
||||
final token = await ref.read(authStateProvider.future);
|
||||
final api = ref.read(apiClientProvider);
|
||||
final data = await api.getJson('/products', token: token);
|
||||
final data = await api.getJson(ProductApiPaths.list, token: token);
|
||||
if (!mounted) return;
|
||||
final products = (data as List<dynamic>)
|
||||
.map((e) => e as Map<String, dynamic>)
|
||||
|
||||
Reference in New Issue
Block a user