feat: refactor API paths for authentication, inventory, and recipes; add contract tests for repositories

This commit is contained in:
Nils-Johan Gynther
2026-04-22 10:21:07 +02:00
parent 655adf66ae
commit c163821bad
8 changed files with 246 additions and 19 deletions
+23
View File
@@ -0,0 +1,23 @@
class AuthApiPaths {
static const login = '/auth/login';
}
class ProductApiPaths {
static const list = '/products';
}
class RecipeApiPaths {
static const list = '/recipes';
static String detail(int id) => '/recipes/$id';
static String update(int id) => '/recipes/$id';
static String remove(int id) => '/recipes/$id';
static const parseMarkdown = '/recipes/parse-markdown';
}
class InventoryApiPaths {
static const list = '/inventory';
static String update(int id) => '/inventory/$id';
static String remove(int id) => '/inventory/$id';
static String consume(int id) => '/inventory/$id/consume';
static String consumptionHistory(int id) => '/inventory/$id/consumption-history';
}