Class: BlogController

BlogController()

HTTP handlers for blog posts.

Constructor

new BlogController()

Source:

Members

formValidation :Array.<express.RequestHandler>

Validation for the blog post form. Field rules run for create and update only; limits match the blog table columns.

Type:
  • Array.<express.RequestHandler>
Source:

routes :express.Router

Type:
  • express.Router
Source:

Methods

(async, static) create()

Source:

(async, static) delete()

Source:

(async, static) getById()

Source:

(static) handleBlogManagement()

Creates, updates or deletes a blog post from the validated form.

Source:

(async, static) list()

Source:

(async, static) update()

Source:

(static) viewBlogManagement()

Renders the blog page with a searched, sorted and paginated list of posts. Loads the post in the URL into the edit form, even when it is not on the current page.

Source: