Module: admin

Members

(inner, constant) bugReports

Temporary logs of bugreports. Solely used for weekly notification of admins and cleared afterwards to ensure privacy of users.
Source:

(inner, constant) contactRequests

Temporary logs contact requests. Solely used for weekly notification of admins and cleared afterwards to ensure privacy of users.
Source:

Methods

(inner) authenticateAdmin(jwe) → {string}

Attempt to authenticate admin by JWE. Upon successful verification, the admin's (user)name is returned. Otherwise, a JWE or JWT error is thrown.
Parameters:
Name Type Description
jwe Object
Source:
Returns:
name of admin
Type
string

(inner) logBugReport(bugreport)

Log a copy of a bugreport in weekly temp storage.
Parameters:
Name Type Description
bugreport Object
Source:

(inner) logContactRequest(contactRequest)

Log a copy of a contact request in weekly temp storage.
Parameters:
Name Type Description
contactRequest Object
Source:

(async, inner) logInAdmin(email, password) → {Object}

Attempt to log in admin and generate a JWE token if successful. Throws an error on failure with appropriate message.
Parameters:
Name Type Description
email String
password String
Source:
Throws:
on invalid email or password
Type
Error
Returns:
JWE token on success
Type
Object

(inner) sendSummary()

Send weekly summary of bugreports and contact requests to admins, then clear temp storage to ensure privacy of users.
Source: