Curetix / mailflare-extension

Browser extension to use Cloudflare Email Routing as an email alias service like AnonAddy or SimpleLogin
https://mailflare.cc
MIT License
51 stars 2 forks source link

[Bug]: Not following pagination #17

Closed evenevan closed 5 months ago

evenevan commented 5 months ago

What is this bug about?

I have more than 20 mail routing rules, and it seems that the extension doesn't interact with the paginated responses of Cloudflare's API to get more.

Steps to reproduce

Replicated on MailFlare v1.4.1

Have more than 20 email routing rules. The extension won't show more than 20 email forwarding rules.

Here is what the /zones/{zone_identifier}/email/routing/rules endpoint gives for me.

{
  "result": [...],
  "success": true,
  "errors": [],
  "messages": [],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "count": 20,
    "total_count": 48
  }
}

Additional info

The zone and destination address endpoints also have the same pagination issue, although I would imagine very few people hit those limits.

Curetix commented 5 months ago

Good catch! I increased the items per page to the max value of 50 and added a way to paginate through all available pages. Let me know if encounter any other issues.

evenevan commented 5 months ago

Awesome! Fix seems to work great. Thanks for all your hard work and this great extension :)