mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
15 lines
424 B
Dart
15 lines
424 B
Dart
import 'package:catcher/catcher.dart';
|
|
import 'package:pocketbase/pocketbase.dart';
|
|
import 'package:spotube/collections/env.dart';
|
|
|
|
final pb = PocketBase(Env.pocketbaseUrl);
|
|
bool isLoggedIn = false;
|
|
Future<void> initializePocketBase() async {
|
|
try {
|
|
await pb.collection("users").authWithPassword(Env.username, Env.password);
|
|
isLoggedIn = true;
|
|
} catch (e, stack) {
|
|
Catcher.reportCheckedError(e, stack);
|
|
}
|
|
}
|