nc-photos/app/lib/use_case/create_share.dart

26 lines
603 B
Dart
Raw Normal View History

import 'package:nc_photos/account.dart';
import 'package:nc_photos/entity/file.dart';
import 'package:nc_photos/entity/share.dart';
2021-09-28 08:37:16 +02:00
class CreateUserShare {
const CreateUserShare(this.shareRepo);
2023-08-27 13:20:37 +02:00
Future<Share> call(Account account, File file, String shareWith) =>
shareRepo.create(account, file, shareWith);
2021-09-28 08:37:16 +02:00
final ShareRepo shareRepo;
}
class CreateLinkShare {
const CreateLinkShare(this.shareRepo);
Future<Share> call(
Account account,
File file, {
String? password,
2023-08-27 13:20:37 +02:00
}) =>
shareRepo.createLink(account, file, password: password);
final ShareRepo shareRepo;
}