Skip to content

Commit

Permalink
feat: prod baseUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
caions committed Feb 24, 2024
1 parent c4ee932 commit 728ed99
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/api/api_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ class CompletedHabitModel {
}

class ApiService {
final Uri _habitsUrl = Uri.parse('http://localhost:8000/habits');
final Uri _completedHabitsUrl =
Uri.parse('http://localhost:8000/habitsCompDate');
//String baseUrl = 'http://localhost:8000';
String baseUrl = 'https://habit-tracker-backend.vercel.app/';
late Uri _habitsUrl;
late Uri _completedHabitsUrl;
ApiService() {
_habitsUrl = Uri.parse('${baseUrl}habits');
_completedHabitsUrl = Uri.parse('${baseUrl}habitsCompDate');
}

Future<List<HabitModel>> getAllHabits() async {
final response = await http.get(_habitsUrl);
Expand Down

0 comments on commit 728ed99

Please sign in to comment.