24 lines
689 B
Dart
24 lines
689 B
Dart
import 'package:fotodocumentation/controller/base_controller.dart';
|
|
import 'package:fotodocumentation/dto/customer_dto.dart';
|
|
|
|
abstract interface class PictureController {
|
|
Future<PictureDto?> get({required int id});
|
|
Future<bool> delete(PictureDto dto);
|
|
}
|
|
|
|
class PictureControllerImpl extends BaseController implements PictureController {
|
|
final String path = "picture";
|
|
|
|
@override
|
|
Future<PictureDto?> get({required int id}) {
|
|
String uriStr = '${uriUtils.getBaseUrl()}$path/$id';
|
|
return runGetWithAuth(uriStr, (json) => PictureDto.fromJson(json));
|
|
}
|
|
|
|
@override
|
|
Future<bool> delete(PictureDto dto) {
|
|
// TODO: implement delete
|
|
throw UnimplementedError();
|
|
}
|
|
}
|