Skip to content

Conversation

@mdauwal
Copy link

@mdauwal mdauwal commented May 31, 2025

πŸš€ Currency Hub: Paginated, Searchable Currency Data API

Summary

This PR enhances the currency-hub module with:

  • βœ… Pagination (page, limit)
  • πŸ” Search by base/target currency or provider
  • πŸ”„ Advanced filtering via QueryCurrencyHubDto
  • πŸ“„ Swagger documentation via @ApiQuery, @ApiOperation

What's Included

  • QueryCurrencyHubDto β€” updated with page, limit, and search
  • currency-hub.service.ts β€” updated findAll method with full logic
  • currency-hub.controller.ts β€” updated with Swagger decorators and updated endpoint

How to Test

  • Visit GET /currency-hub
  • Try queries like:
    • ?page=1&limit=10
    • ?search=USD
    • ?baseCurrencyCode=USD&targetCurrencyCode=NGN

Closes

Closes #56

{ ...baseFilters, baseCurrencyCode: Like(`%${search}%`) },
{ ...baseFilters, targetCurrencyCode: Like(`%${search}%`) },
{ ...baseFilters, provider: Like(`%${search}%`) },
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this function, what happened to the?, please return them?

@mdauwal
Copy link
Author

mdauwal commented Jun 3, 2025

This update merges enhanced filtering, pagination, and search capabilities into the existing CurrencyHub service logic while retaining all operational methods such as:

  • findOne
  • convertCurrency
  • getBestProvider
  • getHistoricalTrend

βœ… Preserves all existing business logic
βœ… Adds paginated findAll with filters and search
βœ… Maintains structure and testability for upcoming versioning

@portableDD portableDD closed this Jun 5, 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.

Implement Global Currency Data API within Currency Hub Module

3 participants