Skip to content

Conversation

@tusharshah21
Copy link
Collaborator

Add Admin Delete Profile Endpoint

Implements DELETE /admin/profiles/:address for admins to delete deprecated/spam profiles.

Changes:

  • Added admin_auth_layer middleware with SIWE/JWT + admin whitelist verification
  • Added admin_delete_profile_handler with profile existence check
  • Admin addresses via ADMIN_ADDRESSES env var (comma-separated)

Config:
ADMIN_ADDRESSES=0xAdmin1,0xAdmin2
need to add it to env

Usage:
curl -X DELETE http://localhost:3001/admin/profiles/0xAddress
-H "Authorization: Bearer JWT_TOKEN"

Closes #146

Copy link
Contributor

@joelamouche joelamouche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job overall!

Please add new variable to env example and a simple script to test the new endpoint

@tusharshah21
Copy link
Collaborator Author

Done mate! commented it in the example env, as it is only open for admin handler, so it would be more simplified for the users

Copy link
Contributor

@joelamouche joelamouche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job 👍

@joelamouche joelamouche merged commit d6acba5 into main Jan 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Figure out how to admin delete profile

3 participants