Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Report & Block] Delete a caller-owned block

Đang mở
#115 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
dart, flutter, supabase
Lĩnh vực
backend

Hướng nghiên cứu

Start with supabase/schemas/dogpack/tables/blocks.sql to confirm the blockerId and blockedId columns, then open lib/moderation/block_repository.dart, where the prerequisite issue #35 insert code should already live. Add unblockUser as a delete filtered by both eq conditions, treating zero affected rows as success. Done when test/moderation/block_repository_dp_r03_2_test.dart passes under flutter test and flutter analyze is clean.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

moderation

What to build

Remove a block placed by the current student. Match both people’s IDs and never remove a block that someone else placed against them.

Files

  • lib/moderation/block_repository.dart (extend the prerequisite’s file)
  • Starting example: supabase/schemas/dogpack/tables/blocks.sql
    Code to add or extend: Future<void> unblockUser(client,blockerId,blockedId).

Steps

  1. Delete from dogpack.blocks with both eq("blockerId", blockerId) and eq("blockedId", blockedId).
  2. Treat an already-missing row as a successful repeated unblock. Let network/permission failures reach the screen so the entry remains visible.
  3. Check both filters; never delete a block someone else placed against the student.

Example

Request has both conditions; repeated unblock succeeds with zero affected rows.

Check it works

In test/moderation/block_repository_dp_r03_2_test.dart, check the example above and the failure or limit described in the steps. Run flutter test test/moderation/block_repository_dp_r03_2_test.dart and flutter analyze.

Before starting

  • #35 — Insert a caller-owned block

References

Assign yourself before starting, or comment to claim the issue. Project setup.

Ngôn ngữ chính
PLpgSQL
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DevDogsUGA/DogPack

Tất cả issue của DevDogsUGA/DogPack

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.