feat: refactor API paths for authentication, inventory, and recipes; add contract tests for repositories
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import '../../../core/api/api_error_mapper.dart';
|
||||
import '../../../core/api/api_paths.dart';
|
||||
import '../../../core/api/api_providers.dart';
|
||||
import '../../../core/forms/form_options.dart';
|
||||
import '../../auth/data/auth_providers.dart';
|
||||
@@ -54,7 +55,7 @@ class _CreateInventoryScreenState
|
||||
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) {
|
||||
setState(() {
|
||||
_products = (data as List<dynamic>)
|
||||
|
||||
Reference in New Issue
Block a user