Module: settingsController

settingsController

settings controller

Author:
  • Yaw Joseph Etse
License:
  • MIT
Source:

Requires

  • module:async
  • module:path
  • module:string-to-json
  • module:utils-merge
  • module:ejs
  • module:periodicjs.core.utilities
  • module:periodicjs.core.controller
  • module:periodicjs.core.mailer

Methods

<inner> load_app_settings(req, res, next) → {object}

load app configuration information

Parameters:
Name Type Description
req object
res object
next object

async callback

Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> load_extension_settings(req, res, next)

load the extensions configuration files from the installed config folder in content/config/extensions/[extension]/[config files]

Parameters:
Name Type Description
req object
res object
next function
Source:

<inner> load_theme_settings(req, res, next) → {object}

load theme configuration information

Parameters:
Name Type Description
req object
res object
next object

async callback

Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> restart_app(req, res) → {object}

restarts application response handler and send notification email

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> sendEmail(options, callbackk)

default email settings, sends mail with nodemailer and mail core extension

Parameters:
Name Type Description
options object

contains email options and nodemailer transport

callbackk function

async callback

Source:

<inner> sendSettingEmail(options, callbackk)

send setting update email

Parameters:
Name Type Description
options object

contains email options and nodemailer transport

callbackk function

async callback

Source:

<inner> update_app(req, res) → {object}

placeholder response for updating application

Parameters:
Name Type Description
req object
res object
Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> update_app_settings(req, res, next) → {object}

form upload handler to update app settings, and sends notification email

Parameters:
Name Type Description
req object
res object
next object

async callback

Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object

<inner> update_ext_filedata(req, res)

save data from config page post

Parameters:
Name Type Description
req object
res object
Source:

<inner> update_theme_settings(req, res, next) → {object}

form upload handler to update theme settings, and sends notification email

Parameters:
Name Type Description
req object
res object
next object

async callback

Source:
Returns:

reponds with an error page or sends user to authenicated in resource

Type
object