1
0
Fork 0
mirror of https://gitlab.com/nkming2/nc-photos.git synced 2025-03-12 02:08:53 +01:00
nc-photos/lib/use_case/create_share.dart
2021-09-28 16:36:41 +08:00

25 lines
603 B
Dart

import 'package:nc_photos/account.dart';
import 'package:nc_photos/entity/file.dart';
import 'package:nc_photos/entity/share.dart';
class CreateUserShare {
const CreateUserShare(this.shareRepo);
Future<Share> call(Account account, File file, String shareWith) =>
shareRepo.create(account, file, shareWith);
final ShareRepo shareRepo;
}
class CreateLinkShare {
const CreateLinkShare(this.shareRepo);
Future<Share> call(
Account account,
File file, {
String? password,
}) =>
shareRepo.createLink(account, file, password: password);
final ShareRepo shareRepo;
}