Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Edward Danilyuk8,105 Points
Help with Routes
I am working on a task API to practice working with Express. I built a /tasks route which lists all tasks and also runs GET/PUT/DELETE on individual tasks ( /tasks/:id ). I want to eventually move a task from an 'active' state to a 'completed' state. What would be the best way to do this? My thoughts are split between: 1) posting the same individual task to a /completed-task route and somehow updating/deleteing the task in the /tasks route or 2) there might be a way to handle this on the database side (using a boolean or a status update) so a separate route would not be necessary? Which would be the better way to go?