Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Report & Block] Delete a caller-owned block

Aperta
#115 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
dart, flutter, supabase
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
PLpgSQL
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DevDogsUGA/DogPack

Tutte le issue di DevDogsUGA/DogPack

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.