Ben-Avrahami / Tindira

0 stars 1 forks source link

Updated createListing to return the ID of the new listing, also added updateListing function #88

Closed OmerK100 closed 4 months ago

OmerK100 commented 4 months ago

Edits to lambda functions: Changed createListing Changed getUserByUserName Changed getListingById Added updateListing Added isUsernameAvailable Added deleteListing Added updateUser

netlify[bot] commented 4 months ago

Deploy Preview for tindira canceled.

Name Link
Latest commit 1ddaf3226ad7e10133431b2e8363ce59e13dc4e7
Latest deploy log https://app.netlify.com/sites/tindira/deploys/6673fe3ee7e23a0008342b6b
OmerK100 commented 4 months ago

Also images array is initialized to empty, don't send it in the body.

OmerK100 commented 4 months ago

Okay, also added updateListing function

OmerK100 commented 4 months ago

Also updated getListingById, getUserByUserName and regsiter.js

OmerK100 commented 4 months ago

Major updates: Now both createListing and updateListing receive a query parameter, (username and listingId accordingly). Price calculation is done on the frontend for both functions, hence price field is now unnecessary, and instead pricePerWholeTime and pricePerMonth are sent instead through the request body.