Skip to content

feat(api): add pagination support to IMAP scan history endpoint#247

Merged
Userunknown84 merged 1 commit into
Userunknown84:mainfrom
devprashant19:fix/pagination-imap-history
Jun 24, 2026
Merged

feat(api): add pagination support to IMAP scan history endpoint#247
Userunknown84 merged 1 commit into
Userunknown84:mainfrom
devprashant19:fix/pagination-imap-history

Conversation

@devprashant19

Copy link
Copy Markdown
Contributor

Description

This PR implements pagination for the IMAP scan history endpoint. Previously, the API fetched historical scan data using a hardcoded limit=100, making any scans beyond the most recent 100 permanently inaccessible to the user via the UI.

Changes

  • backend/email_connectors/imap_store.py: Updated get_scan_history to accept an offset parameter and updated the underlying SQLite query to include OFFSET ?.
  • backend/api.py: Updated the /imap/scan-results route to parse an optional page query parameter (defaulting to 1). The endpoint calculates the correct offset and passes it down to the database layer, returning the paginated results along with the current page metadata.

Related Issues

Type of Change

  • Security fix
  • Bug fix
  • New feature
  • Refactoring

Pre-submission Checklist

  • Verified the page query parameter successfully fetches subsequent segments of history.
  • Tested defaults when page is omitted.

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

@devprashant19 is attempting to deploy a commit to the Aditya Sharma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added bug Something isn't working Hard SSoC26 labels Jun 24, 2026
@Userunknown84 Userunknown84 merged commit 0f19aef into Userunknown84:main Jun 24, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Hard SSoC26

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No Pagination for IMAP Scan History

2 participants