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

Implement reference based transaction filter #60

Merged
merged 2 commits into from
Oct 25, 2021

Conversation

matiasinsaurralde
Copy link
Contributor

@matiasinsaurralde matiasinsaurralde commented Oct 22, 2021

For #55.

Still missing on this PR (it's WIP):

  • P̶o̶s̶t̶g̶r̶e̶s̶ ̶s̶u̶p̶p̶o̶r̶t̶.̶ Fixed in d59c0b9
  • CountTransactions fix. At the moment we count all the transactions. Could be improved as part of this PR or another one.

To test:

  1. Create a transaction by using the transactions endpoint:
    URL: http://localhost:3068/quickstart/transactions
    HTTP Verb: POST
    JSON request:
{
    "reference": "myref",
    "postings": [
      {
        "source": "world",
        "destination": "central_bank",
        "asset": "GEM",
        "amount": 1000
      },
      {
        "source": "central_bank",
        "destination": "users:001",
        "asset": "GEM",
        "amount": 1000
      }
    ]
  }
  1. Hit the requests endpoint adding a query parameter with the myref reference:
    URL: http://localhost:3068/quickstart/transactions?reference=myref
    HTTP Verb: GET

@codecov
Copy link

codecov bot commented Oct 22, 2021

Codecov Report

Merging #60 (d43e6f5) into main (db3a32c) will decrease coverage by 0.29%.
The diff coverage is 0.00%.

❗ Current head d43e6f5 differs from pull request most recent head 7fdc146. Consider uploading reports for the commit 7fdc146 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main      #60      +/-   ##
==========================================
- Coverage   34.21%   33.91%   -0.30%     
==========================================
  Files          26       26              
  Lines        1362     1374      +12     
==========================================
  Hits          466      466              
- Misses        846      857      +11     
- Partials       50       51       +1     
Impacted Files Coverage Δ
api/http.go 0.00% <0.00%> (ø)
ledger/query/query.go 60.00% <0.00%> (-5.63%) ⬇️
storage/postgres/transactions.go 0.00% <0.00%> (ø)
storage/sqlite/transactions.go 82.96% <0.00%> (-2.54%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d019096...7fdc146. Read the comment docs.

@matiasinsaurralde
Copy link
Contributor Author

Fixed PostgreSQL support in d59c0b9 👍

@altitude altitude merged commit 7ff8756 into formancehq:main Oct 25, 2021
flemzord pushed a commit that referenced this pull request Mar 27, 2023
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.

2 participants