1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 16:41:59 +00:00
immich/mobile/lib/repositories/base_api.repository.dart
Fynn Petersen-Frey e0fa3cdbc7
refactor(mobile): more repositories (#12879)
* ExifInfoRepository
 * ActivityApiRepository
 * initial AssetApiRepository
2024-09-24 08:24:48 +02:00

11 lines
313 B
Dart

import 'package:flutter/foundation.dart';
import 'package:immich_mobile/constants/errors.dart';
abstract class BaseApiRepository {
@protected
Future<T> checkNull<T>(Future<T?> future) async {
final response = await future;
if (response == null) throw NoResponseDtoError();
return response;
}
}