COP4331-LargeGroupProject-Fall22 / backend

Backend for SmartChef project, see https://github.com/COP4331-LargeGroupProject-Fall22/SmartChef
0 stars 1 forks source link

Add authorized recipe controller #95

Closed mplekunov closed 1 year ago

mplekunov commented 1 year ago

Depends on #94

mplekunov commented 1 year ago

The recipe routes have been rewritten to fit our new specifications: Routes differentiate between two cases: Unauthorized && Authorized users.

Unauthorized case happens when request doesn't include "Authorization" header. Authorized case happens when request includes "Authorization" header.

When user is Authorized. Responses (in both get/getAll calls) will contain additional field "isFavorite". When it's set to true, it means this recipe is part of the favorite recipes list of the user and vice versa.

nashirj commented 1 year ago

Pls fix merge conflicts

nashirj commented 1 year ago

Overall looks good, just pls add logic for hasAllergen