Methods
(async, static) checkEmailExisting(nameID) → {object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
nameID |
string | email ID to check in the database. |
Returns:
sql response
- Type
- object
(async, static) checkForgotUserExists(userEmail) → {object}
- Source:
Check whether admin exists or not
Parameters:
Name | Type | Description |
---|---|---|
userEmail |
string | email id which the admin exists or not |
Returns:
sql response
- Type
- object
(async, static) getForgotUserToken(email, token) → {object}
- Source:
Get the forgot password token
Parameters:
Name | Type | Description |
---|---|---|
email |
string | admin 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) inserUserToken(user, Token) → {object}
- Source:
Insert forgot password token
Parameters:
Name | Type | Description |
---|---|---|
user |
object | admin 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) 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) updateLastLogin(req, data) → {object}
- Source:
Update Last Login date for the admin
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
data |
string | data is the req.body |
Returns:
sql response
- Type
- object
(async, static) updateProfile(req, data) → {object}
- Source:
update Admin Profile details
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
data |
string | data is the req.body |
Returns:
sql response
- Type
- object
(async, static) userDetails(id) → {object}
- Source:
get adminDetails to verify the token
Parameters:
Name | Type | Description |
---|---|---|
id |
string | id for the admin 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 admin login
Parameters:
Name | Type | Description |
---|---|---|
req |
object | request data |
data |
string | data is the req.body |
Returns:
sql response
- Type
- object