feat(blackList): Issue-523

This commit is contained in:
mso7nueh
2025-06-30 14:27:10 +03:00
parent 693260afb6
commit d4a05f47d1
24 changed files with 313 additions and 6 deletions

View File

@@ -0,0 +1,47 @@
import 'dart:developer';
import 'package:eatvio_app/features/menu/services/blocked_users_service.dart';
import 'package:eatvio_app/features/profile/models/profile_model.dart';
class BlockedUsersRepository {
final BlockedUserService blockedUserService;
BlockedUsersRepository({
required this.blockedUserService,
});
Future<List<ProfileModel>> getBlockedUsers() async {
try {
return (await blockedUserService.getBlockedUsers()).profilesList;
} catch (e, st) {
log(e.toString(), stackTrace: st);
rethrow;
}
}
blockUserBySlug(String slug) async {
try {
return await blockedUserService.blockUser(
data: {
'slug': slug,
},
);
} catch (e, st) {
log(e.toString(), stackTrace: st);
rethrow;
}
}
unblockUserBySlug(String slug) async {
try {
return await blockedUserService.unblockUser(
data: {
'slug': slug,
},
);
} catch (e, st) {
log(e.toString(), stackTrace: st);
rethrow;
}
}
}