Namespace: api/plan

api/plan

REST endpoints for Plan data

Methods


getMine()

Get all of the logged in user's plans


getPublic()

Get all of the public plans at the user's school


load()

Send the plan data for the given plan ID (if the user is authorized)

Parameters:
Name Type Description
req.query.planId

The _id of the plan


makePrivate()

Makes given plan private


makePublic()

Makes given plan public


save()

Saves plan to db and returns created plan

Parameters:
Name Type Description
req.body._id

The _id of the plan

req.body.title

New title of the plan

req.body.years

New json object holding the plan data

req.body.public

New public flag value

req.body.colorscheme

New colorscheme data