Methods
(async, static) addWatchlist(req, projectID) → {object}
- Source:
add to watchlist for the user and project
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
projectID |
string | project_id to which user requested for watchlist |
Returns:
sql response
- Type
- object
(async, static) checkEmailExisting(nameID) → {object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
nameID |
string | email ID to check in the database. |
Returns:
with user details if email exists
- Type
- object
(async, static) checkForgotUserExists(userEmail) → {object}
- Source:
Check whether user exists or not
Parameters:
Name | Type | Description |
---|---|---|
userEmail |
string | email id which the user exists or not |
Returns:
sql response
- Type
- object
(async, static) getEmailVerifyToken(email, token) → {object}
- Source:
Get email verify token
Parameters:
Name | Type | Description |
---|---|---|
email |
string | email the verify token is generated |
token |
string | Token which is generated |
Returns:
sql response
- Type
- object
(async, static) getForgotUserToken(email, token) → {object}
- Source:
Get the forgot password token
Parameters:
Name | Type | Description |
---|---|---|
email |
string | user object which the forgot password is requested |
token |
string | Token which is unique for each forgot password request |
Returns:
sql response
- Type
- object
(async, static) getPhoneVerifyToken(phone) → {object}
- Source:
get phone verification token
Parameters:
Name | Type | Description |
---|---|---|
phone |
string | Phone number to which the token is to be checked |
Returns:
sql response
- Type
- object
(async, static) insertEmailVerifyToken(userId, userEmail, Token) → {object}
- Source:
Insert email verify token
Parameters:
Name | Type | Description |
---|---|---|
userId |
string | User ID |
userEmail |
string | UserEmail the verify token is generated |
Token |
string | Token which is generated |
Returns:
sql response
- Type
- object
(async, static) insertPhoneVerifyToken(userExist, token, ip) → {object}
- Source:
Insert phone verification token
Parameters:
Name | Type | Description |
---|---|---|
userExist |
string | user object who has request forgot password |
token |
string | token generated for the phone number verification |
ip |
string | ip address of the user's browser |
Returns:
sql response
- Type
- object
(async, static) insertPreference(req) → {object}
- Source:
Insert the User Preference
Parameters:
Name | Type | Description |
---|---|---|
req |
object | req object |
Returns:
sql response
- Type
- object
(async, static) inserUserToken(user, Token) → {object}
- Source:
Insert forgot password token
Parameters:
Name | Type | Description |
---|---|---|
user |
object | user object which the forgot password is requested |
Token |
string | Token which is unique for each forgot password request |
Returns:
sql response
- Type
- object
(async, static) isinWatchlist(req, data) → {object}
- Source:
check if the project is in watch list table for the user
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
data |
string | data is the req.body |
Returns:
sql response
- Type
- object
(async, static) loginWithEmail(nameID) → {object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
nameID |
string | email ID to check in the database. |
Returns:
with user details if email exists
- Type
- object
(async, static) manualInsertUsernotify(req, data) → {object}
- Source:
Manually insert notification to the user
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
data |
string | data is the req.body |
Returns:
sql response
- Type
- object
(async, static) process(req, data) → {object}
- Source:
Login Process function. Checking the password and salt
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
data |
string | data is the req.body |
Returns:
sql response
- Type
- object
(async, static) registerUser(req, data) → {object}
- Source:
Register User Function
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
data |
string | data is the req.body |
Returns:
sql response
- Type
- object
(async, static) registerUserCustom(req, data) → {object}
- Source:
Register Custom User Function
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
data |
string | data is the req.body |
Returns:
sql response
- Type
- object
(async, static) removeWatchlist(req, projectID) → {object}
- Source:
remove watchlist for the user and project
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
projectID |
string | project_id to which user requested for watchlist |
Returns:
sql response
- Type
- object
(async, static) selectUserPreference(userID) → {object}
- Source:
select the User Preference
Parameters:
Name | Type | Description |
---|---|---|
userID |
string | id for the user which is to be fetched |
Returns:
sql response
- Type
- object
(async, static) updateCustomUsersProfile(req, data) → {object}
- Source:
Update Custom User Profile details
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
data |
string | data is the req.body |
Returns:
sql response
- Type
- object
(async, static) updateEmailVerified(userExist) → {object}
- Source:
Update email verify token as verified
Parameters:
Name | Type | Description |
---|---|---|
userExist |
string | user Object to which the reset |
Returns:
sql response
- Type
- object
(async, static) updateEmailVerifiedToken(userExist) → {object}
- Source:
Update email verify token as verified and used
Parameters:
Name | Type | Description |
---|---|---|
userExist |
string | user Object to which the reset |
Returns:
sql response
- Type
- object
(async, static) updateForgotUserToken(userExist) → {object}
- Source:
Update the forgot password token as used
Parameters:
Name | Type | Description |
---|---|---|
userExist |
object | user object who has request forgot password |
Returns:
sql response
- Type
- object
(async, static) updateLastLogin(req, data) → {object}
- Source:
Update Last Login date for the user
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
data |
string | data is the req.body |
Returns:
sql response
- Type
- object
(async, static) updatePhoneVerified(id) → {object}
- Source:
update verification token
Parameters:
Name | Type | Description |
---|---|---|
id |
string | ID of the verification |
Returns:
sql response
- Type
- object
(async, static) updatePhoneVerifyExpiry(id) → {object}
- Source:
update verification token expired
Parameters:
Name | Type | Description |
---|---|---|
id |
string | ID of the verification |
Returns:
sql response
- Type
- object
(async, static) updatePreference(req, notifyID) → {object}
- Source:
Update the User Preference
Parameters:
Name | Type | Description |
---|---|---|
req |
object | req object |
notifyID |
string | notification ID to update |
Returns:
sql response
- Type
- object
(async, static) updateProfile(req, data) → {object}
- Source:
update User Profile details
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
data |
string | data is the req.body |
Returns:
sql response
- Type
- object
(async, static) updateResetPassword(password, userExist) → {object}
- Source:
Update the reset password request
Parameters:
Name | Type | Description |
---|---|---|
password |
string | user object which the forgot password is requested |
userExist |
object | user object who has request forgot password |
Returns:
sql response
- Type
- object
(async, static) updateSocialID(req, userId) → {object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
userId |
string | email ID to check in the database. |
Returns:
with user details if email exists
- Type
- object
(async, static) updateWatchlist(req, projectID) → {object}
- Source:
update watchlist to the user and project
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
projectID |
string | project_id to which user requested for watchlist |
Returns:
sql response
- Type
- object
(async, static) userDetails(id) → {object}
- Source:
get userDetails to verify the token
Parameters:
Name | Type | Description |
---|---|---|
id |
string | id for the user which is to be fetched |
Returns:
sql response
- Type
- object
(async, static) userViews(req, data) → {object}
- Source:
Add a entry in login table to log users login
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
data |
string | data is the req.body |
Returns:
sql response
- Type
- object