Closed MarinTrpenovski closed 1 year ago
have manage to connect layer in the project and commit the newest versions of the controllers after checking let me know for more corrections if something is missing
Just remove this code I think its not needed to have init() method. I was just for testing purposes before connect to Database. Now when you are connected to Database you can remove method and all logic related with manipulation with that Array. @AngelaM123 Please take a look at this issue.
If you want to keep it, in case to remember it you can leave it in one of the Entities, but remove logic from REST endpoint when invoke them.
I have edited the controller classes I have deleted the init() method and other codes related to that logic
Code looks good @AngelaM123 closing this issue.
Integrate service layer in REST controllers. Now each of the endpoints should return data from Database.
When link service layer methods use @autowire anotation to use service's classes in controllers.
REST endpoints should return ResponseEntity object with appropriate status codes for each of the CRUD operations. (https://www.baeldung.com/spring-response-entity)
You can start work on this issue