Namespace: app

app

Version:
  • 1.0
Since:
  • 23/10/2020
Author:
  • Brennan Wilkes
Source:

Classes

searchQuery

Methods

(static) failedLogin() → {Promise}

Creates a new promise and immediately rejects it
Source:
Returns:
Always rejected promise which resolves to "Invalid credentials"
Type
Promise

(static) validateNum(n, d) → {number}

Validates a number to be inserted into MariaDB
Parameters:
Name Type Default Description
n number Number to validate
d number 0 Default value to return in the case of invalid input. Defaults to 0
Source:
Returns:
A number which is guaranteed to be valid. Returns d in n is invalid
Type
number