Skip to content

Fix addList function to include type in API request URL - #3620

Merged
PromoFaux merged 1 commit into
developmentfrom
fix/lists
Oct 4, 2025
Merged

Fix addList function to include type in API request URL#3620
PromoFaux merged 1 commit into
developmentfrom
fix/lists

Conversation

@PromoFaux

Copy link
Copy Markdown
Member

What does this PR aim to accomplish?:

The web interface was sending POST requests to /api/lists with the list type specified only in the JSON payload:

{
  "address": ["example.com"],
  "type": "block",
  "groups": [0]
}

However, the FTL API expects the type to be specified as a URL query parameter for the generic /api/lists endpoint, not in the payload. This caused requests to fail with the error: "Specify type parameter (should be either 'allow' or 'block')".

Fixes an issue reported on Discourse: https://discourse.pi-hole.net/t/blocklist-error-on-qnap-container/82625


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

  • I have read the above and my PR is ready for review. Check this box to confirm

@PromoFaux
PromoFaux requested a review from a team as a code owner October 4, 2025 21:37
@PromoFaux
PromoFaux merged commit ccb160c into development Oct 4, 2025
10 checks passed
@PromoFaux
PromoFaux deleted the fix/lists branch October 4, 2025 21:55
@PromoFaux PromoFaux mentioned this pull request Oct 25, 2025
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.

2 participants