enhance vendor and sales contact
with some error handling
and getby which get the vendor/customer depending on the parsing string being id, name or none
How to Test
for get vendor
/api/vendorcontact/ -> get all vendor from db
/api/vendorcontact/?id=# -> get the vendor with id 1. if there is a vendor with id 1 it will show that vendor, if there's no vendor with id 1, it will show error 404
/api/vendorcontact/?name=# -> get all vendor with name #.
for get customer same than get vendor just change the http to /api/salescontact/
Description
enhance vendor and sales contact with some error handling and getby which get the vendor/customer depending on the parsing string being id, name or none
How to Test
for get vendor /api/vendorcontact/ -> get all vendor from db /api/vendorcontact/?id=# -> get the vendor with id 1. if there is a vendor with id 1 it will show that vendor, if there's no vendor with id 1, it will show error 404 /api/vendorcontact/?name=# -> get all vendor with name #.
for get customer same than get vendor just change the http to /api/salescontact/