Skip to content

Conversation

pacion
Copy link
Contributor

@pacion pacion commented Nov 18, 2022

No description provided.

Rozumek29 and others added 15 commits August 22, 2022 19:54
* Database connection and config.
* Add entities structure

* Create database
Need to repair annotations, stuck in relations

* Repair relations

* Init swagger
Simple configuration
* Add get all endpoint
Rename entity for better understanding the code
Utils to map DTOs

* Add unit tests for get methods

* Code cleanup
* Add base structure with errors

* Save succesfully endpoint

* Enlarge trans by title and description
Add save test (not passing yet)
Code refactoring

* Code cleanup
* Create login endpoint
CredentialsDTO would be needed for authentication.

* JWT with refresh token

* Current version with auth error

* Clean code
Preparation for future test service

Co-authored-by: @Rozumek29
* Repair tests
create, replace, getall
When converted public static into public transUtils method there was an error that told me that i should start mocking all the methods i use.

* Add get test

* Delete endpoint
Related category is also deleted when no transactions provided.

* Add delete unit test

* Code refactor
Now utils bases on the inheritance because it is much more correct than dependency injection.
* Add get, get, delete endpoints

* Code refactor

* Add test
-that throws exception when no user found
-that creates category when no category found

* Code refactor
Add extra method so the tests are easier to write and the 1-5 lines method are preserved.

* Change delete test
now the service test coverage is 100%

* Code refactor
one responsibility for methods

* Separate user and admin
Separated endpoints are in other controllers & services.
Moved tests to different classes.
* First init
Make changelog
Basic sql to check if initialization was made properly

* Script to generate data
Create script in groovy to fill .sql with example values to be used in liquibase

* Add more scripts
for creating:
-roles
-categories
-users

* End database creation
All scripts created, now need.
Bug: role_user can't authorize role_user controller

* Add check authority
* Eliminate n + 1 query
Reduced time for making select all transactions query by writing simple sql JOIN

* Scattered in files table creation

* Validate params

* Test repair without clazz param

* Add class<T> to test

* Add pageable endpoints for user

* Add test changes
* Add create and get endpoint

* Create delete endpoint

* Eliminate n+1
during transaction get all endpoint invoked

* Add put endpoints
Refactor of the code
- all the appUser mapper methods are changed into factory thats reffers to other methods via. Factory Design Pattern

* Add tests for user service

* Add throw test

* Add token JWT test
* Change add user endpoint
now admin can add user with admin role

* Code refactor
now roles are sent using list

* Finished role strategy

* Add remover to the strategy

* Implement singleton strategies

* Refactor of unit tests

* Refactor of endpoints
Moved PUT endpoints to user controller
In the future the PUT admin endpoint will contain the whole AppUser object change

* Endpoint creation
Need to think about role creation

* Add PUT endpoint
TODO:
 -create get single user endpoint for admin
 -refactor of the code written
 -convert utils into factory

* Test refactor

* Add get single user with test

* Add tests for endpoints
* Create AppUserMapper

utils contact with mapper and contacts with other mappers & passwordEncoder

* Add roleMapper

* Transaction util refactor
fix n + 1

* Test refactor

* AppUser test refactor

* Transaction test refactor

* Add Package private
Now all the public classes if they can they are package private scope

* Code refactor
Add another abstract layer between service and utils usage.
* Validation failed version

* Create structure
Add own code status codes and messages that are inherited from spring's one.
Unit tests refactor

* Refactor result methods

* Add notFound exception

* Add different return
if success: own status & description
if error: default responseEntity

* Add integral tests
Transaction tests for
 add & get & put & delete

* Code refactor

* Change name of method
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