[Report & Block] Delete a caller-owned block
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 55/100
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
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
- Delete from
dogpack.blockswith both eq("blockerId", blockerId) and eq("blockedId", blockedId). - Treat an already-missing row as a successful repeated unblock. Let network/permission failures reach the screen so the entry remains visible.
- 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
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DevDogsUGA/DogPack
-
polish
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DevDogsUGA/DogPack#131 ·
-
polish
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
DevDogsUGA/DogPack#130 ·
-
moderation
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DevDogsUGA/DogPack#119 ·
-
moderation
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
DevDogsUGA/DogPack#113 ·
-
discover
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
DevDogsUGA/DogPack#106 ·
Tutte le issue di DevDogsUGA/DogPack
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
juice-shop/juice-shop#3686 ·
I maintainer di solito rispondono entro 1 giorno
-
perf(translator): Claude→Responses stream re-validates the whole request body on every SSE chunkAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
router-for-me/CLIProxyAPI#6665 ·
I maintainer di solito rispondono entro 1 giorno
-
[Issue]: hipsparselt.h C API as shipped now requires C23 -- ONLY because of missing include or guardAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ROCm/rocm-libraries#13736 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100