mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
12 lines
271 B
Dart
12 lines
271 B
Dart
|
|
import 'package:immich_mobile/constants/errors.dart';
|
||
|
|
|
||
|
|
class ApiRepository {
|
||
|
|
const ApiRepository();
|
||
|
|
|
||
|
|
Future<T> checkNull<T>(Future<T?> future) async {
|
||
|
|
final response = await future;
|
||
|
|
if (response == null) throw NoResponseDtoError();
|
||
|
|
return response;
|
||
|
|
}
|
||
|
|
}
|