forked from eatvio/eatvio_app
56 lines
1.3 KiB
Dart
56 lines
1.3 KiB
Dart
import 'package:eatvio_app/features/complaining/models/complain_model.dart';
|
|
import 'package:eatvio_app/features/complaining/services/complaining_service.dart';
|
|
|
|
class ComplainingRepository {
|
|
final ComplainingService service;
|
|
ComplainingRepository({required this.service});
|
|
|
|
Future<void> sendPlanComplain({
|
|
required String slug,
|
|
required String category,
|
|
required ComplainModel body,
|
|
}) async {
|
|
try {
|
|
service.sendPlanComplain(slug: slug, category: category, body: body);
|
|
} catch (e) {
|
|
rethrow;
|
|
}
|
|
}
|
|
|
|
Future<void> sendRecipeComplain({
|
|
required String slug,
|
|
required String category,
|
|
required ComplainModel body,
|
|
}) async {
|
|
try {
|
|
service.sendRecipeComplain(slug: slug, category: category, body: body);
|
|
} catch (e) {
|
|
rethrow;
|
|
}
|
|
}
|
|
|
|
Future<void> sendBlogPostsComplain({
|
|
required int id,
|
|
required String category,
|
|
required ComplainModel body,
|
|
}) async {
|
|
try {
|
|
service.sendBlogPostsComplain(id: id, category: category, body: body);
|
|
} catch (e) {
|
|
rethrow;
|
|
}
|
|
}
|
|
|
|
Future<void> sendProfileComplain({
|
|
required String slug,
|
|
required String category,
|
|
required ComplainModel body,
|
|
}) async {
|
|
try {
|
|
service.sendProfileComplain(slug: slug, category: category, body: body);
|
|
} catch (e) {
|
|
rethrow;
|
|
}
|
|
}
|
|
}
|