fix: update API endpoints in AuthRepository and RecipeRepository to remove redundant '/api' prefix

This commit is contained in:
Nils-Johan Gynther
2026-04-21 22:10:16 +02:00
parent 4efc15bc2c
commit 78bcf9bc98
2 changed files with 2 additions and 2 deletions
@@ -10,7 +10,7 @@ class AuthRepository {
Future<String> login(String email, String password) async {
final response = await _api.post(
'/api/auth/login',
'/auth/login',
jsonEncode({'email': email, 'password': password}),
);
if (response.statusCode != 200 && response.statusCode != 201) {
@@ -8,7 +8,7 @@ class RecipeRepository {
RecipeRepository(this._api);
Future<List<Recipe>> fetchRecipes({String? token}) async {
final response = await _api.get('/api/recipes', token: token);
final response = await _api.get('/recipes', token: token);
if (response.statusCode != 200) {
throw Exception('Failed to load recipes: ${response.statusCode}');
}