stanislavtrifonov88 / rentalcar

Rental Car Training Project
0 stars 0 forks source link

All rest responses should return their own objects, not the database #5

Closed stanislavtrifonov88 closed 4 years ago

stanislavtrifonov88 commented 4 years ago

Rest api should return own objects, not database objects. Hiding persistence (db) implementation from rest api is both security and design issue.

stanislavtrifonov88 commented 4 years ago

I created a transformer methods for Cars and Contracts to design the object send from the backend. Frontend adjusted as well to the new object structures