resend verify email

This commit is contained in:
Riley Davis
2017-01-31 12:04:19 -07:00
parent 976c821715
commit 56ddc49386
13 changed files with 233 additions and 92 deletions
+20
View File
@@ -89,6 +89,20 @@ class ErrAssetCommentingClosed extends APIError {
}
}
/**
* ErrAuthentication is returned when there is an error authenticating and the
* message is provided.
*/
class ErrAuthentication extends APIError {
constructor(message = null) {
super('authentication error occured', {
status: 401
}, {
message
});
}
}
// ErrContainsProfanity is returned in the event that the middleware detects
// profanity/wordlisted words in the payload.
const ErrContainsProfanity = new APIError('Suspected profanity. If you think this in error, please let us know!', {
@@ -110,6 +124,10 @@ const ErrNotAuthorized = new APIError('not authorized', {
status: 401
});
// ErrSettingsNotInit is returned when the settings object isn't available in
// the mongo collection.
const ErrSettingsNotInit = new Error('settings not initialized, run `./bin/cli settings init` to setup the settings');
module.exports = {
ExtendableError,
APIError,
@@ -125,5 +143,7 @@ module.exports = {
ErrAssetCommentingClosed,
ErrNotFound,
ErrInvalidAssetURL,
ErrSettingsNotInit,
ErrAuthentication,
ErrNotAuthorized
};