UNPKG

@speedcubing/cookie

Version:

Speedcubing Online's UI design.

27 lines 878 B
/** * Returns the error message for the provided number. * @param {number} code * @returns {string} the response message */ function getLoginErrorMessage(code) { switch (code) { case 1: return `An internal server error occurred. If this keeps happening, please report it.`; case 5: return `That email isn't associated with any account.`; case 6: return `That email is already in use.`; case 7: return `That password isn't strong enough, it must be atleast 8 characters long and contain atleast 1 each: uppercase letter, lowercase letter, number and symbol.`; case 8: return `That username is already taken.`; case 9: return `Unable to reset password, outdated token.`; case 10: return `Incorrect password.`; case 11: return `You are already logged in.`; case 12: return `You are not logged in.`; } }