feat: refactor API paths for authentication, inventory, and recipes; add contract tests for repositories
This commit is contained in:
@@ -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';
|
||||
}
|
||||
Reference in New Issue
Block a user