immich/mobile/lib/data/server/api_repository.dart
Adam Gastineau 8dcfd36fa5
chore(mobile): move Drift into mobile/data (#30966)
* chore(mobile): move Drift into mobile/data

* Move into more structured subdirectories

* Fix changed merge paths
2026-08-25 00:51:02 +05:30

13 lines
293 B
Dart

import 'package:immich_mobile/data/server/errors.dart';
class ApiRepository {
const ApiRepository();
Future<T> checkNull<T>(Future<T?> future) async {
final response = await future;
if (response == null) {
throw const NoResponseDtoError();
}
return response;
}
}