call code iff user is logged in
call code iff user is logged in
Disable a route without having to comment out the entry in the routes file.
Disable a route without having to comment out the entry in the routes file. Useful for when we want to keep the code around but we don't want users to have access to it.
call code iff user has right permission for resource
call code iff user has right permission for resource
Use when you want to require the user to be logged in on a private server or the server is public.
Use when you want to require the user to be logged in on a private server or the server is public.
call code iff user is a server admin
call code iff user is a server admin
get user if logged in
get user if logged in
REST endpoint: POST: Add a section.
REST endpoint: POST: Add a section. Requires that the request body contains a valid ObjectId in the "file_id" field, otherwise returns a BadRequest. A new ObjectId is created for this section.
REST endpoint: POST: Add tags to a section.
REST endpoint: POST: Add tags to a section. Requires that the request body contains a "tags" field of List[String] type.
Add thumbnail to section.
REST endpoint: GET: get info of this section.
REST endpoint: GET: get the tag data associated with this section.
REST endpoint: GET: get the tag data associated with this section. Returns a JSON object of multiple fields. One returned field is "tags", containing a list of string values.
Return user based on request object
Return user based on request object
REST endpoint: POST: remove all tags.
REST endpoint: POST: remove tags.
REST endpoint: POST: remove tags. Requires that the request body contains a "tags" field of List[String] type.
Files sections.