From 78bcf9bc985a902577f702e4f0c3d25a2ade5ea6 Mon Sep 17 00:00:00 2001 From: Nils-Johan Gynther Date: Tue, 21 Apr 2026 22:10:16 +0200 Subject: [PATCH] fix: update API endpoints in AuthRepository and RecipeRepository to remove redundant '/api' prefix --- flutter/lib/features/auth/data/auth_repository.dart | 2 +- flutter/lib/features/recipes/data/recipe_repository.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flutter/lib/features/auth/data/auth_repository.dart b/flutter/lib/features/auth/data/auth_repository.dart index bf9d874e..1154f5b4 100644 --- a/flutter/lib/features/auth/data/auth_repository.dart +++ b/flutter/lib/features/auth/data/auth_repository.dart @@ -10,7 +10,7 @@ class AuthRepository { Future 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) { diff --git a/flutter/lib/features/recipes/data/recipe_repository.dart b/flutter/lib/features/recipes/data/recipe_repository.dart index a6886eec..b6ef59b7 100644 --- a/flutter/lib/features/recipes/data/recipe_repository.dart +++ b/flutter/lib/features/recipes/data/recipe_repository.dart @@ -8,7 +8,7 @@ class RecipeRepository { RecipeRepository(this._api); Future> 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}'); }