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

[Reputation Oracle] refactor: common folder cleanup #3095

Merged
merged 14 commits into from
Feb 14, 2025
Merged

Conversation

dnechay
Copy link
Contributor

@dnechay dnechay commented Feb 13, 2025

Tip

It might be easier to review it commit-by-commit for some parts

Issue tracking

Part of #3084

Context behind the change

  • existing e2e removed because not used; we might want set up it later from scratch
  • no need in app.controller, we have specific routes
  • SnakeCaseInterceptor refactored to TransformInterceptor so it's clear that it's used for transforming request/response; also made case transformers clear by refactoring code, adding unit tests and removing implicit logic on date. toISOString
  • deleted unused constants, types, functions, etc.
  • some regrouping done to index.ts files instead of separate "one function file", so now we keep it simple, later can group things if they appear
  • simplified the flow where we accept enum values in any case from HTTP layer; it wasn't enabled before, now done via simple decorators; left some todos for later
  • utils now live in separate folder for better visibility, so people can notice them and check if there is some existing tool already
  • introduced some common testing utilities in test/mock-creators; later would be nice to have fixtures there already

How has this been tested?

  • running service locally and triggering endpoints to make sure case transformation and enums validation works e2e
  • existing unit tests pass for modules where code reorganization took place
  • new unit tests pass

Release plan

Test & merge

Potential risks; What to monitor; Rollback plan

Should be no risks. The only new change is related to values case transformation, but it extends APIs, not reduces what they acceps.

Copy link

vercel bot commented Feb 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
human-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2025 1:55pm
human-dashboard-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2025 1:55pm
staking-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2025 1:55pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
faucet-frontend ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2025 1:55pm
faucet-server ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2025 1:55pm

@dnechay dnechay merged commit 9bf2fc8 into develop Feb 14, 2025
12 checks passed
@dnechay dnechay deleted the dnechay/3084 branch February 14, 2025 12:39
@dnechay dnechay mentioned this pull request Feb 14, 2025
16 tasks
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