Skip to content

Commit 9332bb1

Browse files
committed
wip
1 parent a1295e5 commit 9332bb1

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

lib/api_client.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ApiClient {
3131
final response = await http.post(
3232
Uri.parse('$baseUrl/api/v2/token'),
3333
headers: {HttpHeaders.contentTypeHeader: 'application/json'},
34-
body: json.encode({'username': 'admin', 'password': 'adminadmin'}),
34+
body: json.encode({'username': 'admin', 'password': 'adminadmin'}), // FIXME
3535
);
3636
if (response.statusCode == 200) {
3737
log.log(Level.ALL, response.body);

lib/app_config.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
class AppConfig {
2+
// TODO: base this off of base URL returned by auth provider
23
static const String djangoUrl = 'http://192.168.1.195:8000';
34
static const String powersyncUrl = 'http://192.168.1.195:8080';
45
}

lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void main() async {
8080
await openDatabase();
8181

8282
final loggedIn = await isLoggedIn();
83-
print('is logged in $loggedIn');
83+
print('main(): is logged in $loggedIn');
8484

8585
// Locator to initialize exerciseDB
8686
await ServiceLocator().configure();

lib/screens/home_tabs_screen.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ class _HomeTabsScreenState extends State<HomeTabsScreen> with SingleTickerProvid
5353
@override
5454
void initState() {
5555
super.initState();
56+
57+
final authProvider = context.read<AuthProvider>();
58+
print('auth provider says surverurl is ${authProvider.serverUrl}');
59+
5660
// Loading data here, since the build method can be called more than once
5761
_initialData = _loadEntries();
5862
}
@@ -82,7 +86,8 @@ class _HomeTabsScreenState extends State<HomeTabsScreen> with SingleTickerProvid
8286
} catch (e) {
8387
print('fail' + e.toString());
8488
}
85-
89+
final loggedIn = await isLoggedIn();
90+
print('_loadEntries(): is logged in $loggedIn');
8691
final authProvider = context.read<AuthProvider>();
8792

8893
if (!authProvider.dataInit) {

0 commit comments

Comments
 (0)