serum-390 / soen390-team16-godzilla

Codename GODZILLA: project for course SOEN-390
GNU General Public License v3.0
4 stars 0 forks source link

Packaging #202

Closed theNafsters closed 3 years ago

theNafsters commented 3 years ago

Description

Added an API route, handler and made changes to the database to incorporate packing products

Link to work item

api/packagedproduct/

How to Test

1- Spin up docker 2- mvn spring-boot:run 3- Check api/packagedproducts/ 4- Send GET/PUT/POST/DELETE requests on postman

Ysabz commented 3 years ago

The post request doesn't work if the id is not provided. Since the id is serial it should not be provided by the user. a possible fix is to remove the id field in data.pgsql - > INSERT INTO packaged_products(ID, LENGTH, WIDTH, HEIGHT, WEIGHT, PACKAGE_TYPE, PACKAGE_DATE) VALUES (7 ,10, 11, 12, 14.2, 'small box','2021-02-15');

Also, PUT does not work when the id is not provided in the id field in json.

Ysabz commented 3 years ago

you need to merge main into your branch again