Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add offset and limit to key transfer API #5358

Merged
merged 14 commits into from
Jul 22, 2024

Conversation

dracarys18
Copy link
Member

Type of Change

  • Enhancement

Description

Add offset and limit to key transfer API

Motivation and Context

This adds from and limit parameters to Key transfer API and thus providing a way to transfer the keys in batches.

How did you test it?

  1. Run /accounts/transfer with from and limit parameters. It should respond with the total_transferred same as limit.
curl --location 'http://localhost:8080/accounts/transfer' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
    "from": 0,
    "limit": 2
}'
  1. Do the same thing for user/key/transfer
curl --location 'http://localhost:8080/user/key/transfer' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
    "from": 0,
    "limit": 2
}'

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code

@dracarys18 dracarys18 added A-core Area: Core flows S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Jul 18, 2024
@dracarys18 dracarys18 self-assigned this Jul 18, 2024
@dracarys18 dracarys18 requested review from a team as code owners July 18, 2024 08:01
@dracarys18 dracarys18 added this to the July 2024 Release milestone Jul 18, 2024
@dracarys18 dracarys18 linked an issue Jul 18, 2024 that may be closed by this pull request
ArjunKarthik
ArjunKarthik previously approved these changes Jul 18, 2024
NishantJoshi00
NishantJoshi00 previously approved these changes Jul 18, 2024
ThisIsMani
ThisIsMani previously approved these changes Jul 18, 2024
@dracarys18 dracarys18 requested review from a team as code owners July 19, 2024 07:29
@hyperswitch-bot hyperswitch-bot bot added the M-database-changes Metadata: This PR involves database schema changes label Jul 19, 2024
@dracarys18 dracarys18 force-pushed the add_offset_to_transfer_key branch from 11630c5 to 12340c8 Compare July 19, 2024 07:32
@hyperswitch-bot hyperswitch-bot bot removed the M-database-changes Metadata: This PR involves database schema changes label Jul 19, 2024
@dracarys18 dracarys18 requested a review from lsampras July 19, 2024 07:33
@dracarys18 dracarys18 removed the request for review from NishantJoshi00 July 22, 2024 07:30
ArjunKarthik
ArjunKarthik previously approved these changes Jul 22, 2024
@dracarys18 dracarys18 requested review from NishantJoshi00 and removed request for a team July 22, 2024 07:34
ThisIsMani
ThisIsMani previously approved these changes Jul 22, 2024
vspecky
vspecky previously approved these changes Jul 22, 2024
Copy link
Member

@vspecky vspecky left a comment

Choose a reason for hiding this comment

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

LGTM

crates/diesel_models/src/query/merchant_key_store.rs Outdated Show resolved Hide resolved
@dracarys18 dracarys18 dismissed stale reviews from vspecky, ThisIsMani, and ArjunKarthik via 1b41b4d July 22, 2024 08:49
@likhinbopanna likhinbopanna enabled auto-merge July 22, 2024 09:42
@likhinbopanna likhinbopanna added this pull request to the merge queue Jul 22, 2024
Merged via the queue into main with commit b393803 Jul 22, 2024
13 checks passed
@likhinbopanna likhinbopanna deleted the add_offset_to_transfer_key branch July 22, 2024 10:28
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix] add offset and limit parameters to key transfer API
9 participants