17 lines
492 B
Dart
17 lines
492 B
Dart
import 'package:proxibuy/core/services/api/api_routes.dart';
|
|
import 'package:proxibuy/core/services/api/api_service.dart';
|
|
import 'package:proxibuy/data/models/auth/user_info_model.dart';
|
|
|
|
class AuthRepository {
|
|
static Future<UserInfoModel?> fetchUserInfo() async {
|
|
try {
|
|
var response = await apiService.get(ApiRoutes.userInfo);
|
|
print("Users: $response");
|
|
return UserInfoModel.fromJson(response);
|
|
} catch (e) {
|
|
print("Error: $e");
|
|
rethrow;
|
|
}
|
|
}
|
|
}
|