GalDear / Sababa

0 stars 0 forks source link

Main page - server #11

Closed shaharbaba closed 2 years ago

shaharbaba commented 2 years ago

/api/user_type # get email and return account type(worker/recruiter)

if account type is worker: /api/get_ads # get email, return list of 20 relevant ads. /api/like_ad # get ad id and email, and attach the ad id to the user. return 1 incase of success and -1 error. /api/dislike_ad # get ad id and email, and saved the ad in unlike. return 1 incase of success and -1 error.

if account type is recruiter: /api/get_like_users # get ad id, and return all users that like the ad. /api/like_user # get ad id and email, and attach the ad id to the user. create new match & new chat with ad creator and received email. incase of success 1 and -1 error. /api/dislike_user # get ad id and email, and delete the user from the people list that liked the ad. return 1 incase of success and -1 error.