Refactor code structure for improved readability and maintainability

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Nils-Johan Gynther
2026-04-23 21:14:46 +02:00
parent cd4274575e
commit db1128ceaf
49 changed files with 285993 additions and 175 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ class ApiClient {
if (token != null) 'Authorization': 'Bearer $token',
};
Future<Map<String, dynamic>> getJson(String path, {String? token}) async {
Future<dynamic> getJson(String path, {String? token}) async {
final response = await _client.get(
Uri.parse('$baseUrl$path'),
headers: _headers(token: token),
+9
View File
@@ -28,6 +28,15 @@ class PantryApiPaths {
static String remove(int id) => '/pantry/$id';
}
class UserApiPaths {
static const me = '/users/me';
static const list = '/users';
static String setRole(int id) => '/users/$id/role';
static String setPremium(int id) => '/users/$id/premium';
static String delete(int id) => '/users/$id';
static String resetPassword(int id) => '/users/$id/reset-password';
}
class MealPlanApiPaths {
static const list = '/meal-plan';