Skip to content

feat: add pagination to GET /tasks - #18

Open
tonysong8 wants to merge 1 commit into
mainfrom
feature/pagination
Open

feat: add pagination to GET /tasks#18
tonysong8 wants to merge 1 commit into
mainfrom
feature/pagination

Conversation

@tonysong8

Copy link
Copy Markdown
Owner

Summary

Closes #2

Adds a paginate() utility and wires it into GET /tasks so the endpoint no longer returns unbounded results.

Changes

  • New src/pagination.js utility with page and limit support
  • Response now returns { data, total, page, limit }

Test Plan

  • GET /tasks?page=1&limit=5 returns first 5 tasks
  • GET /tasks?page=2&limit=5 returns next 5
  • Missing params default to page=1, limit=20
  • Works correctly with existing status/priority filters

@tonysong8

Copy link
Copy Markdown
Owner Author

Looks good overall! One thought — should we cap the max cputime unlimited
filesize unlimited
datasize unlimited
stacksize 7MB
coredumpsize 0kB
addressspace unlimited
memorylocked unlimited
maxproc 8000
descriptors 1048576 to something like 100 to prevent someone requesting 10,000 tasks at once?

@tonysong8

Copy link
Copy Markdown
Owner Author

reviewed - prioritizing with team

@tonysong8

Copy link
Copy Markdown
Owner Author

Agreed on the cap — suggest defaulting max limit to 100

1 similar comment
@tonysong8

Copy link
Copy Markdown
Owner Author

Agreed on the cap — suggest defaulting max limit to 100

@tonysong8

Copy link
Copy Markdown
Owner Author

테스트 플랜 항목들에 대해 좀 더 상세한 설명을 부탁드립니다. 각 항목별로 예상 입력값, 예상 결과, 그리고 테스트 방법을 구체적으로 작성해 주시면 검토에 도움이 될 것 같습니다.

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.

1 participant