Feat/add delete /api/v1/profile ( issues 579, 855, 898, 919)#973
Merged
Yunusabdul38 merged 6 commits intoJun 27, 2026
Conversation
|
@D-Ochuko is attempting to deploy a commit to the oseh-svg's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@D-Ochuko Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds DELETE /api/v1/profile endpoint for GDPR-compliant organizer profile removal
Adds exponential back-off with a 300-second cap to the Soroban RPC listener to reduce log flood and node pressure during outages
Hardens image_url validation on event creation with a 2048-character length cap and explicit test coverage for data URIs
Adds contract tests verifying that ScannerAuthorized and ScannerRevoked events include the organizer's address in authorized_by / revoked_by
Changes per issue
#579 — DELETE /api/v1/profile
server/src/handlers/profile.rs: new delete_profile handler — executes DELETE FROM organizer_profiles WHERE address = $1, returns 204 on success, 404 if row not found, invalidates Redis cache
server/src/routes/mod.rs: imports delete_profile, registers it on the DELETE / slot of profile_routes
#855 — Soroban listener exponential back-off
server/src/handlers/soroban_listener.rs: adds MAX_BACKOFF constant (300 s), tracks current_backoff in the listener loop — first failure sleeps POLL_INTERVAL, each subsequent consecutive failure doubles the delay up to MAX_BACKOFF, resets to POLL_INTERVAL on the first successful poll; adds test_backoff_sequence_doubles_and_caps
#898 — image_url HTTPS validation
server/src/handlers/events.rs: extracts inline validation into validate_image_url(url: &str) -> Result<(), AppError>, adds a 2048-character length guard; updates create_event to call the function; refactors existing tests to use the function and adds test_image_url_data_uri_rejected, test_image_url_exceeds_max_length_rejected, test_image_url_exactly_max_length_accepted
#919 — Scanner event organizer address tests
contract/contracts/event_registry/src/issue_tests.rs: adds test_authorize_scanner_event_includes_authorized_by and test_revoke_scanner_event_includes_revoked_by — each verifies the correct topic is emitted and constructs the event struct with the organizer address field to confirm it compiles and holds the right value
Test plan
cargo test -p agora-server — profile, listener, and events unit tests pass
cargo test -p event-registry — new scanner event tests and existing issue tests pass
DELETE /api/v1/profile with valid JWT returns 204; with no existing profile returns 404; without JWT returns 401
Soroban listener logs show increasing retry delays during RPC outage and reset on recovery
POST /api/v1/events with image_url: "data:image/png;base64,..." returns 400; with a URL longer than 2048 chars returns 400; with a valid https:// URL succeeds
Closes #579
Closes #855
Closes #898
Closes #919